|
|
|
|
Re: updating an element text in XML document [message #570828 is a reply to message #570785] |
Fri, 16 November 2012 03:18 |
|
Michel Cadot
Messages: 68731 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
After fixing your data to be a valid XML string:
SQL> with
2 data as (
3 select xmltype('<placemark id = "5467">
4 <name> 415-CI-78492</name>
5 <description><![CDATA[<//!!!!//15249599]]></description>
6 <ICON><href>http://localhost:63077/Icons/Markers/pushpin.png</href></ICON>
7 </placemark>') val from dual
8 )
9 select updatexml(val,'//href/text()','http://http://localhost:63077/Icons/Markers/ship.png')
10 from data
11 /
UPDATEXML(VAL,'//HREF/TEXT()','HTTP://HTTP://LOCALHOST:63077/ICONS/MARKERS/SHIP.
--------------------------------------------------------------------------------
<placemark id="5467"><name> 415-CI-78492</name><description><![CDATA[<//!!!!//15
249599]]></description><ICON><href>http://http://localhost:63077/Icons/Markers/s
hip.png</href></ICON></placemark>
Regards
Michel
|
|
|