Hi;
I am not an XMLDB expert;)
May be this example which I found on web helps;)
Please find this URL for any further reference
https://cwisdb.cc.kuleuven.ac.be/ora10doc/appdev.101/b10790/xdb04cre.h
tm
Updating Multiple Text Nodes and Attribute Values Using updateXML()
SELECT extractValue(object_value,'/PurchaseOrder/Requestor') Name,
extract(object_value,'/PurchaseOrder/LineItems') LINEITEMS
FROM PURCHASEORDER
WHERE
existsNode(object_value,'/PurchaseOrder[Reference="SBELL-2002100912333
601PDT"]') = 1;
NAME LINEITEMS
----------------
----------------------------------------------------------------------
--
Sarah J. Bell <LineItems>
<LineItem ItemNumber="1">
<Description>A Night to Remember</Description>
<Part Id="715515009058" UnitPrice="39.95"
Quantity="2"/>
</LineItem>
<LineItem ItemNumber="2">
<Description>The Unbearable Lightness Of
Being</Description>
<Part Id="37429140222" UnitPrice="29.95"
Quantity="2"/>
</LineItem>
<LineItem ItemNumber="3">
<Description>Sisters</Description>
<Part Id="715515011020" UnitPrice="29.95"
Quantity="4"/>
</LineItem>
</LineItems>
1 row selected.
UPDATE PURCHASEORDER
SET object_value = updateXML
(
object_value,
'/PurchaseOrder/Requestor/text()','Stephen G.
King',
'/PurchaseOrder/LineItems/LineItem[1]/Part/@Id','786936150421',
'/PurchaseOrder/LineItems/LineItem[1]/Description/text()','The Rock',
'/PurchaseOrder/LineItems/LineItem[3]',
XMLType
(
'<LineItem ItemNumber="99">
<Description>Dead Ringers</Description>
<Part Id="715515009249"
UnitPrice="39.95" Quantity="2"/>
</LineItem>'
)
)
WHERE
existsNode(object_value,'/PurchaseOrder[Reference="SBELL-2002100912333
601PDT"]') = 1;
1 row updated.
SELECT extractValue(object_value,'/PurchaseOrder/Requestor') Name,
extract(object_value,'/PurchaseOrder/LineItems') LINEITEMS
FROM PURCHASEORDER
WHERE
existsNode(object_value,'/PurchaseOrder[Reference="SBELL-2002100912333
601PDT"]') = 1;
NAME LINEITEMS
----------------
----------------------------------------------------------------------
--
Stephen G. King <LineItems>
<LineItem ItemNumber="1">
<Description>The Rock</Description>
<Part Id="786936150421" UnitPrice="39.95"
Quantity="2"/>
</LineItem>
<LineItem ItemNumber="2">
<Description>The Unbearable Lightness Of
Being</Description>
<Part Id="37429140222" UnitPrice="29.95"
Quantity="2"/>
</LineItem>
<LineItem ItemNumber="99">
<Description>Dead Ringers</Description>
<Part Id="715515009249" UnitPrice="39.95"
Quantity="2"/>
</LineItem>
</LineItems>
1 row selected.
Regards
J
-----Original Message-----
From: Ramakrishna
[mailto:oracledba-ezmlmshield-x53797057.[Email address protected]
Sent: Tuesday, November 30, 2004 1:08 PM
To: LazyDBA Discussion
Subject: URGENT HELP NEEDED
Dear Gurus,
I am having xml file as below
<?xml version="1.0" encoding="UTF-8"?>
<xml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/schemas/CON
DOR11/
SBC_SOQAR.xsd">
----
----
----
----
I want to update the attribute value "xsi:noNamespaceSchemaLocation",
I read in the Oracle Documents that its possible with
UPDATEXML() Function , But I am not able to do the same. Plz tell me
How can i do this.
Thanx in advance,
Regds
Ramki
========================================================
"God, grant me the serenity to accept the things I cannot change,
the courage to change the things I can, and the wisdom to discern
them...."
========================================================
Ramkrishna A S
DBA/RM,
Wisor Telecom India Pvt.,Ltd.
3rd Floor Royal Arcade,
80 feet Road Koramangala,
BANGALORE - 560095.
Tele:+ 91-80-25525821/2/3(x4257).
Fax:+ 91-80-5536538
Resi:91-080-23131396
mobile :98457 99943
========================================================
E-mail : [Email address protected]
Web: www.wisor.com
========================================================
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:
see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree
to these terms:http://www.lazydba.com/legal.html
==================================================================
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
Oracle LazyDBA home page