Extract the value of the node with multiple namespace xml
Hello
I have to extract values in xml that includes several namepspaces. a single namespace has value of xmlns. I managed to get the value of the node for tag event where as info tag returns null.
experrts need help.
<? XML version = "1.0" encoding = "utf-8"? >
< event xmlns = " " http://www.w3.org/2001/XMLSchema-instance ' >
< data xmlns = ">
< object >
< eventtype > 110 < / eventtype >
< result > < / result >
< / object > < / data >
< xmlns = info "> < jref > JREF < / jref >
< / info >
< / event >
SELECT
TMX.eventtype,
TMX.result,
TMX.jref
of EXAMPLE_MESSAGES1.
XMLTABLE (XMLNAMESPACES (DEFAULT 'http://www.w3.org/2001/XMLSchema-instance'), )
' for $i in/event/data/object
Returns the local item: r {$i / eventtype,}
$i / result.
{$i / jref}'
EXAMPLE_MESSAGES1 OF PASSAGE. XML_MESSAGE
COLUMNS
EVENTTYPE VARCHAR2 (30) PATH "eventtype"
RESULT VARCHAR2 (30) PATH 'result ',.
TMX JREF PATH VARCHAR2 (30) 'jref');
Version of the database is 11.2.0.3.0
Hello
I have to extract values in xml that includes several namepspaces.
There is only one workspace names in fact (the default value).
Normally, an empty xmlns UN-declare a default namespace declaration is inherited from the parent node.
So, in your example, only
In this case, when you have to walk through the nodes belonging to some namespaces and others in any namespace, do not use the DEFAULT option in the WITH XMLNAMESPACES. Instead, declare a prefix and use it as needed for qualify of nodes. Another thing: Returns the local item: r {$i / eventtype,} What what do you want with "local:" here? The following should give the expected results: SELECT TMX.* of EXAMPLE_MESSAGES1 XMLTABLE) XMLNAMESPACES ("http://www.w3.org/2001/XMLSchema-instance" as "ns0") , ' / ns0:event' EXAMPLE_MESSAGES1 OF PASSAGE. XML_MESSAGE COLUMNS EVENTTYPE VARCHAR2 (30) PATH 'data, object, eventtype. , RESULT VARCHAR2 (30) PATH ' object/data/result '. , PATH of VARCHAR2 (30) JREF ' info/jref. ) TMX;
Tags: Database
Similar Questions
-
Gears - error when you try to insert values into a table with multiple columns
Hello
I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.
I have:
var db = google.gears.factory.create('beta.database'); db.open('developerSet'); db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)'); var devName = "Davy" var devAge = 32; try { db.execute('insert into Developers values (?, ?)', [devName, devAge]); alert('success'); } catch (e) { alert(e); }
I get the error:
net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.
I use this reference: http://code.google.com/apis/gears/api_database.html
Everything works if I have only one field as:
var db = google.gears.factory.create('beta.database'); db.open('developerSet'); db.execute('create table if not exists Developers (DeveloperName text)'); var devName = "Davy" var devAge = 32; try { db.execute('insert into Developers values (?)', [devName]); alert('success'); } catch (e) { alert(e); }
I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56
Thank you
Davy
Yes, a SQLite database will persist between battery pulls. The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.
In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data. This adds extra overhead fresh for the final, delete and insert first for a given table. Instead, define and finalize your drawing before you create your table. Once created, review the static schema.
That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.
See you soon,.
Adam
-
Fill the tree with complex external XML file control
Hi all. I've been combing through forums for two days and have not been able to find a solution to my problem. I'm trying to populate a control of the tree with an external xml file, but the xml file is not a simple. It is complex, and I don't know how to get the tree to display these data. I have attached the code. Can someone take a look and let me know how I could get this to work? Thank you!What does not work?
Complexity of the XML is not, in itself, an issue for the tree.
Also, I recommend using straight XML, unless specifically, you need Collection features.
Tracy
-
How to extract the node where the value of the node is the max in all of the XML document?
Hello
I have a transaction that refers to an xmltype in iRecruitment, containing multiple versions of the same node as follows:
(only for the example data)
{noformat} & lt; Transaction & gt;
& lt; data & gt;
& lt; ObjectVersionNumber & gt; 1 & lt; / object_version_number & gt;
& lt; EO & gt;
& lt; Attribute1 & gt; A & lt; / Attribute1 & gt;
& lt; Attribut2 & gt; B & lt; / attribut2 & gt;
& lt; /EO & gt;
& lt; / data & gt;
& lt; data & gt;
& lt; ObjectVersionNumber & gt; 2 & lt; / object_version_number & gt;
& lt; EO & gt;
& lt; Attribute1 & gt; A & lt; / Attribute1 & gt;
& lt; Attribut2 & gt; C & lt; / attribut2 & gt;
& lt; /EO & gt;
& lt; / data & gt;
& lt; data & gt;
& lt; ObjectVersionNumber & gt; X & lt; / object_version_number & gt;
& lt; EO & gt;
& lt; Attribute1 & gt;? & lt; / Attribute1 & gt;
& lt; Attribut2 & gt;? & lt; / attribut2 & gt;
& lt; /EO & gt;
& lt; / data & gt;
& lt; / Transaction & gt; {noformat}
I can extract a value for FULL-TIME 1 or 2, is not a problem.
However, how can I go on the selection of a value of an attribute below FULL-TIME X, where X is the maximum value of FULL-TIME in any node in the XML document?
I tried to the last node corresponding to my way, but it is not always the case that the FULL-TIME max will correspond to this scenario.
Any help would be greatly appreciated!
Thank you very much, Pete
Published by: Pete Mahon on February 24, 2009 12:11Here's a way
SQL> set long 100000 SQL> with XML as ( 2 select XMLTYPE( 3 ' 4
5 6 ') OBJECT_VALUE 27 from dual 28 ) 29 select DATA, OVN 30 from XML, 31 XMLTable 32 ( 33 '/Transaction/data' 34 passing OBJECT_VALUE 35 columns 36 DATA XMLType path '.', 37 OVN number path 'ObjectVersionNumber' 38 ) 39 where OVN = ( select MAX(OVN) 40 from XML, 41 XMLTable 42 ( 43 '/Transaction/data' 44 passing OBJECT_VALUE 45 columns 46 OVN number path 'ObjectVersionNumber' 47 ) 48 ) 49 SQL> / DATA -------------------------------------------------------------------------------- OVN ----------1 78 11 12 13A 9B 102 1415 18 19 20A 16C 173 2122 25 26? 23? 243 3 SQL>? ? -
Replacement of the nodes with duplicates
I can't find out how to write an XQuery query which can essentially 'jump' a replacement when I said to. I don't know who makes no sense, so here's a better explanation.
I have an XML file that is stored in an Oracle XML DB that looks like this:
We get the update commands that look like the same thing, with a 'command' attached to add the book to the store or drop:<bookstore> <book title="Analytical Chemistry" publish_date="198710"> <author>... <publisher>.... <etc.> </book> <book title="Particle Physics" publish_date="199202"> <author>... <publisher>.... <etc.> </book> <book title="Applied Biophysics" publish_date="201005"> <author>... <publisher>.... <etc.> </book> </bookstore>
The rule is should I replace or add a book in the store if I have a book of the same title, and the order is "merge", or drop it if the order is to 'drop '. I have a request XQuery Update function now makes what looks like this:<bookstore> <book title="Analytical Chemistry" publish_date="199210"> <order>merge</order> <author>... <publisher>.... <etc.> </book> <book title="Particle Physics" publish_date="199202"> <order>drop</order> <author>... <publisher>.... <etc.> </book> <book title="Chaos Theory" publish_date="199102"> <order>merge</order> <author>... <publisher>.... <etc.> </book> </bookstore>
This works very well for commands like above, but once from time to time, we receive a command like this:declare updating function local:book_merge($old, $book_merge) { for $orderEntr in $book_merge/book let $chgCd := $orderEntr/order let $orderTitle := $orderEntr/@title let $oldBooks := $old/bookstore let $oldBookEntr := $oldBooks/book[@title=$orderTitle] return if( $chgCd = "drop" and exists($oldBookEntr) ) then delete node $oldBookEntr else if( exists($oldBookEntr) ) then replace node $oldBookEntr with $orderEntr else insert node $orderEntr into $oldBooks };
Notice how the first entry is duplicated. In this case, the requirement must only enter the book in the library once. Can someone give me an idea of how I would go about implementing that? I am struggling to understand how to ask the right question, so please forgive me.<bookstore> <book title="Analytical Chemistry" publish_date="199210"> <order>merge</order> <author>... <publisher>.... <etc.> </book> <book title="Analytical Chemistry" publish_date="199210"> <order>merge</order> <author>... <publisher>.... <etc.> </book> <book title="Particle Physics" publish_date="199202"> <order>drop</order> <author>... <publisher>.... <etc.> </book> <book title="Chaos Theory" publish_date="199102"> <order>merge</order> <author>... <publisher>.... <etc.> </book> </bookstore>
You can add a predicate that will filter the next (or previous) duplicates of a given input:
where not($orderEntr/following-sibling::book[@title = $orderTitle])
Full test case:
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> create table tmp_xml of xmltype; Table created. SQL> insert into tmp_xml values ( 2 xmltype('
3 ') 16 ); 1 row created. SQL> var orders clob SQL> begin 2 3 :orders := '4 7XXX 56 8 11YYY 910 12 15ZZZ 1314 4 '; 25 26 end; 27 / PL/SQL procedure successfully completed. SQL> set long 5000 SQL> set pages 100 SQL> SQL> select /*+ no_xml_query_rewrite */ 2 xmlserialize(document 3 xmlquery( 4 'copy $d := $old 5 modify ( 6 for $orderEntr in $orders/bookstore/book 7 let $chgCd := $orderEntr/order 8 let $orderTitle := $orderEntr/@title 9 let $oldBooks := $d/bookstore 10 let $oldBookEntr := $oldBooks/book[@title = $orderTitle] 11 where not($orderEntr/following-sibling::book[@title = $orderTitle]) 12 return 13 if( $chgCd = "drop" and exists($oldBookEntr) ) 14 then delete node $oldBookEntr 15 else if( exists($oldBookEntr) ) 16 then replace node $oldBookEntr with $orderEntr 17 else insert node $orderEntr into $oldBooks 18 ) 19 return $d' 20 passing object_value as "old" 21 , xmlparse(document :orders) as "orders" 22 returning content 23 ) 24 indent 25 ) as result 26 from tmp_xml ; RESULT --------------------------------------------------------------------------------5 9merge 6XXX 7123 810 14merge 11XXX 12123 1315 19drop 16YYY 1718 20 24merge 21ZZZ-2 2223 merge XXX 123 ZZZ merge ZZZ-2 It's another question, you probably already have the answer: I guess you must also remove the
nodes of the newly merged books? -
Problem when executing the processors in the nodes with disabled local storage
Hello world
We test the coherence JSR107 (a.k.a. JCache) implementation of Yannis (https://github.com/yannis666/Coherence-JSR-107) and we found the following issue when you work with a local storage where distributed cache node is disabled (using - Dtangosol.coherence.distributed.localstorage = false). Yannis implementation uses several EntryProcessors for the execution of operations get() or put () in the cache. For example, the following code is used to update a value in the cache:
/ public class PutProcessor implements InvocableMap.EntryProcessor {}
@Override
public Object process (input InvocableMap.Entry) {}
BEntry entry = (BinaryEntry) BinaryEntry;
return bEntry.isPresent ()? bEntry.getBinaryValue (): null;
}
}
And put operatino is taken from the following code:
namedCache.invoke (key, CPU)
where processor argument contains a reference to the PutProcessor object.
When we call JSR107 performs surgery put in the cache and code above we get following exception:
java.lang.NullPointerException
to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Storage.invoke (PartitionedCache.CDB:10)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:52)
to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ InvokeRequest.run (PartitionedCache.CDB:1)
at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:34)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
at java.lang.Thread.run(Thread.java:662)
Of course we have previously started another node in the cluster with local storage enabled.
It seems that, as no storage card is present at the node, a NullPointerException is thrown when you try to insert the entry.
Could someone give advice on this problem and how to overcome? This implementation is based on the processor is not compatible with the knots of localstorage cache disabled?
Thank you in advance,
Daniel C.Hello
It sounds like COH-7180 - demand deserialization failure results in a cryptic NullPointerException, that has been fixed in one of the 3.7.1 patches. The real problem is that your entryprocessor cannot be deserialized.
-
To create a ToolTip text for the image with multiple image map links
Hello
RH6 using, that I imported a picture into a topic. For the images that I have created several maps image to post a link to other topics. However, I can't create a map image additional to that same image that includes only the screen Tip text. I get a message of invalid value: "Please select a file, bookmark or topic to bind the hyperlink to.»
Is there a way to create a popup only the text of an image with multiple image map links? My final output will be to WebHelp but possibly migrate FlashHelp in the near future.
Thank you
FMnRH
Thank you
FMnRHIf the image is at the beginning of the subject, or all alone in a reference topic, you can put "#" (without the quotes) as the link for each area reactive.
If the image is larger than the viewing window, it can jump to the top, but only if the user clicks on the link.
I tried wz_tooltips and like it. I agree with Leon, it will take time for the first image but maybe go faster later.
Harvey
-
Context: Target cannot find the node with id 33
Hello
In my qml file, I used the spreadsheet component. When you click the button, I tried to call the RPC function that calls the web service and according to the response from the service web I have to redirect to special qml. But while qml opening of the CPP, I get the following errors.
libpng warning: iCCP: known incorrect sRGB profile Context: Failed to find target node with id 33
For a moment, I am able to redirect to special qml but control returned to previous qml.
I am not able to understand why this error came? When I run my application a day before it was working fine. When I reset the device and upgrade the operating system 10.2 I get this error.
Here is my code in the PRC:
QmlDocument *qml = QmlDocument::create("asset:///backgroundProcessImageFile.qml"); qml->setContextProperty("RoamAssist", this); AbstractPane *root = qml->createRootObject
(); globalApp->setScene(root); Hey... my problem is solved...
Insted to create the user interface using the sheet I just create new page and open it using NavigationPane.
I still don't know if this issue is due to the component of the roadmap or due to the os version upgradation.
-
share 'Start' content and presentation of the tile with multiple users on the same Tablet Windows RT
Hello
Can someone tell me if it is possible to share/copy the content start and the tile layout with multiple users on the same shelf?
Hello
Welcome to the Microsoft community.
Unfortunately, you will not be able to share or copy the content start and available to tile with multiple users. However, you can rearrange the tiles and select the content to be displayed manually on each of the user accounts.
See these articles for more details:
Customize the splash screen
http://Windows.Microsoft.com/en-in/Windows-8/start-screen#1TC=T1
Reorganization of the tiles start
http://Windows.Microsoft.com/en-in/Windows-8/rearrange-tiles-start
I hope this helps. Let us know if you need more assistance.
-
fill the void with multiple spaces
How can I create a fill in the blank question with multiple spaces? Specifically, I need to show an equation and my question will look like white = white + white...
FIB can have as many spaces as you like: select the word, indicate it as white. He was never limited to a white.
However: you cannot mark partial with FIB.
-
Strategy for the SSO with multiple vCenter servers.
We are upgrading vSphere/SRM 5.0U1 for vSphere/SRM 5.5U1 with multiple vCenters in our environment. After reading 2058239 KB:
VMware KB: installing vCenter Single Sign-On 5.5 on a Microsoft Windows platform
We install SSO on a separate Windows Server and choose vCenter Single Sign-On for your first server vCenter Server for this first instance. Now my question is for the following facilities as the vCenter for MRS or vCenters which manages areas replacement fault which option, existing site or new, do we choose? Thank you
You have therefore three sites.
The first time, you will choose vCenter Single Sign-On for your first server vCenter Server.
For the second one on the same site, you choose existing vCenter Single Sign-On for an additional vCenter Server in a site.
Now, when you come to an another site vCenter and third, you will need to decide if you have a site that is your main or you want to still have a site on the second.
If you decide to join at the elementary level, that you will yet choose existing vCenter Single Sign-On for an additional vCenter Server in a site.
If you choose to have another site, you choose vCentre of Single Sign-On for an additional vCenter Server with a new site.
The end of it, you will have to make the decision to design. I can only tell you what they mean. Make sure you have adequate connectivity between sites.
-
How to configure Hostname of the node with the REST API?
I tried the value of hostname of the virtual machine when I deploy an application, but were unsuccessful. The application consists of all the operating system - there is no installed service but an example here that I used when I deployed the application. It is based on the release of the REST API "node info": for the particular deployment profile.
{
'node': [{}
"name': 'VM1."
"properties": [{}
"hostname": "joe".
}],
["nodeComponent":]
}]
}
But when you use this application I get the error message: "the node 'VM1' does not exist in the current 'deployment profile'. ' even if 'VM1' is the only node in the deployment profile. I tried other variations and still get the same error message.
Does anyone have suggestions for how I can configure the hostname of the node when you deploy the application? Thank you.
Apparently, the REST API for planning a deployment is designed after characteristic GUI Application Director "rapid deployment". Rapid deployment does not allow the substitution of properties of node as hostname. Idea being the deployment profile once defined and prepared, each individual call of it must change some subset of the properties of the component. We can always create several profiles of deployment to account for changes in node.
Nevertheless, it seems that property of node specifications would help your situation... so that your comments reached the product team.
Thank you rags
This posting is provided as is and confers no rights.
-
Structured XML index with multiple namespaces
Hello
I have some difficulty to create a xmlindex with a component structured on a column of xmltype without schema register, clob data using multiple namespaces.
The code I'm using atm:
At this time, it is not desirable for us to save the schemas used in oracle. According to the documentation, I should be able to add a component structured index as follows:CREATE TABLE "DECLARATIONS" ( "ID" NUMBER(19,0), "XML" "SYS"."XMLTYPE" ) CREATE INDEX decl_header_ix ON "DECLARATIONS"(xml) INDEXTYPE IS XDB.XMLINDEX PARAMETERS ('PATHS (INCLUDE (/emcs:emcsDeclaration/emcs:header//*) NAMESPACE MAPPING (xmlns:emcs="http://www.myurl.eu/myapp/schema/emcs/nl"))'); INSERT INTO "DECLARATIONS" VALUES (1,' <?xml version = ''1.0'' encoding = ''UTF-8'' standalone = ''yes''?> <emcs:emcsDeclaration xsi:schemaLocation="http://www.myurl.eu/myapp/schema/emcs/nl emcs_domain.xsd" xmlns:common="http://www.myurl.eu/myapp/schema/common" xmlns:emcs="http://www.myurl.eu/myapp/schema/emcs/nl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <emcs:header> <common:identifier>70</common:identifier> <common:declarationSequenceNumber>54566</common:declarationSequenceNumber> <common:dateCreated>2010-10-21-01:00</common:dateCreated> <common:status>01 Draft e-AAD in preparation</common:status> </emcs:header> </emcs:emcsDeclaration>');
However the result is an ORA-00904: invalid identifier. After a few experiences it seems that oracle is trying to parse the URL namespace as identifiers (even tho http://download.oracle.com/docs/cd/E14072_01/appdev.112/e10492/xdb_indexing.htm#BCGJAAGH & http://download.oracle.com/docs/cd/E14072_01/appdev.112/e10492/xdb_xquery.htm#BABJCHCC specify the old), so I swapped their autour:BEGIN DBMS_XMLINDEX.registerParameter('MY_XSI_GROUP_PARAMETER' , 'ADD_GROUP GROUP MY_XSI_GROUP XMLTABLE decl_header XMLNAMESPACES (''http://www.myurl.eu/myapp/schema/emcs/nl'' AS emcs, ''http://www.myurl.eu/myapp/schema/common'' AS common), ''*'' COLUMNS status VARCHAR2(30) PATH ''/emcs:emcsDeclaration/emcs:header/common:status/text()'' '); END; / ALTER INDEX DECL_HEADER_IX PARAMETERS('PARAM MY_XSI_GROUP_PARAMETER');
Oracle doesn't seem to be a little further in this, resulting in an ORA-19102: literal string XQuery waited. Here, I kinda hit a dead-end. Removing the with xmlnamespaces altogether leads to an ORA-31013 statement: invalid XPATH expression. Passing by the examples on http://www.liberidu.com/blog/?p=1805 works very well, but whenever I try to add namespaces to it they stop working as well.BEGIN DBMS_XMLINDEX.dropParameter('MY_XSI_GROUP_PARAMETER'); DBMS_XMLINDEX.registerParameter('MY_XSI_GROUP_PARAMETER' , 'ADD_GROUP GROUP MY_XSI_GROUP XMLTABLE decl_header XMLNAMESPACES (emcs ''http://www.myurl.eu/myapp/schema/emcs/nl'', common ''http://www.myurl.eu/myapp/schema/common''), ''*'' COLUMNS status varchar2(30) PATH ''/emcs:emcsDeclaration/emcs:header/common:status/text()'' '); END; / ALTER INDEX DECL_HEADER_IX PARAMETERS('PARAM MY_XSI_GROUP_PARAMETER');
So my question is: How do xmlnamespaces (with the default namespaces) to work in a structured xmlindex component?Hello
I agree that is not specified in the documentation, but in the with XMLNamespaces clause, each namespace identifier must be enclosed in double quotes.
So, pretty much like your first attempt:BEGIN DBMS_XMLINDEX.registerParameter( 'MY_XSI_GROUP_PARAMETER', 'ADD_GROUP GROUP MY_XSI_GROUP XMLTABLE decl_header XMLNAMESPACES (''http://www.myurl.eu/myapp/schema/emcs/nl'' AS "emcs", ''http://www.myurl.eu/myapp/schema/common'' AS "common"), ''*'' COLUMNS status VARCHAR2(30) PATH ''/emcs:emcsDeclaration/emcs:header/common:status/text()''' ); END; /
Subsequently, the addition of the parameter to the index should be OK.
-
Update the value of the node with particular attribute
Hello
Oracle 11g
I have a table with the following structure:
The xml_done column uses the following structure (example XML):create table xml_test (test_id varchar2(12), xml_done xmltype);
I have a requirement to update the text in the < value > < / value > based on @attribute of the id in the data < item > which it is. In my code below, I'm updating the 1 value to be 'updated value'. I tried UPDATEXML without success:<meas id="test"> <data-elements> <data-element id="abc"> <value>1</value> </data-element> <data-element id="def"> <value>2</value> </data-element> <data-element id="ghi"> <value>3</value> </data-element> </data-elements> </meas>
Any suggestions are appreciated, thank you very much!UPDATE xml_Test SET XML_DONE = UPDATEXML(XML_DONE, '/meas/data-elements/data-element/value','updated value') WHERE extract(xml_done, '/meas/data-elements/data-element/@id') = 'abc' and test_id = 1;
Published by: chris001 on April 25, 2013 10:14Hello
The WHERE clause filters the rows in the table, not within the XML document.
You must use an XPath predicate for this.SQL> create table xml_test (test_id varchar2(12), xml_done xmltype); Table created. SQL> SQL> insert into xml_test (test_id, xml_done) 2 values ('1', 3 xmlparse(document 4 '
5 ') 17 ); 1 row created. SQL> commit; Commit complete. SQL> update xml_test 2 set xml_done = 3 updatexml( 4 xml_done 5 , '/meas/data-elements/data-element[@id="abc"]/value/text()' 6 , 'updated value' 7 ) 8 where test_id = '1' ; 1 row updated. SQL> set long 5000 SQL> set pages 100 SQL> select xml_done from xml_test where test_id = '1'; XML_DONE --------------------------------------------------------------------------------6 167 91 810 122 1113 153 14updated value 2 3 If you also want to make sure that the line actually contains something to update, use XMLExists in the WHERE clause:
SQL> roll; Rollback complete. SQL> update xml_test 2 set xml_done = 3 updatexml( 4 xml_done 5 , '/meas/data-elements/data-element[@id="abc"]/value/text()' 6 , 'updated value' 7 ) 8 where test_id = '1' 9 and xmlexists( 10 '/meas/data-elements/data-element[@id=$id]' 11 passing xml_done 12 , 'abc' as "id" 13 ) 14 ; 1 row updated. SQL> select xml_done from xml_test where test_id = '1'; XML_DONE --------------------------------------------------------------------------------
updated value 2 3 If you are on 11.2.0.3, you can officially use XQuery Update instead.
-
How to share the library with multiple users?
I have a Mac Pro 2008. I have four internal hard drives. One of them is an SSD that is my boot drive. I have another internal drive that houses my music and movies (2 TB).
I have four different connections - mine (admin), my wife, my son, my daughter.
How can I share music on (2 TB) library with other users? I read to the music folder (shared) - however since the 2 TB is not a boot disc, there is no shared folder.
You try to share an iTunes library, or the drive contains just music files.
Other users can see the drive, or simply don't have access to the records.
Maybe you are looking for
-
I recently format my computer and reinstall windows 7, since it was the only way I know of to solve the problem with Firefox (I already had this problem too). I download the latest version of firefox 33.0.2 and install it. This version was super fast
-
The first couple times I tried the wireless on the 6 d it worked flawlessly, and now whenever I put in the number password for my wifi network to phone, the phone says it is conencted, but then the wifi turned off the camera. I tried forget network o
-
HP Envy 4500: HP Envy 4500 Ink Jet works with both cartridges are black?
Then I load two black cartridges in this ink jet printer and do it print? (after that I tell it to do black and white only).
-
Hello A very complicated problem. that I ran. I created a panorama with Photoshop CS5 (running Windows Vista). There is a number of images BULLIES that have been sewn together using Psalm I flattened the image and saved in the jpg format. This jpg
-
Add the new hard drive, windows does not start now
OK, ill be as specific as possible here Ive always had a few hard drives in my computer at all times A few days ago, I had problems with my windows 7 install that I tabled to the installation while I had all of my hard drives connected at installatio