Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How may I update the schemaLocation in XMLtype field.

magicliverJun 16 2011 — edited Jun 21 2011
Hi everyone,

I have a table of records with one field of XMLtype. The records contain a schemaLocation that contains a directory path and I have been asked to remove this in all records. Though I can use xpath commands to update other elements in the xml, I have no idea how to carry out this at the root level. I cannot use the exact data as its classified but here is a dummy version:
<gcXML:MD_Metadata xmlns:gcXML="http://www.test.com/Project/Catalog" xsi:schemaLocation="http://www.test.com/Project/Catalog C:/test/file.xsd"
<blah>.....
</blah>
<gcXML:MD_Metadata>

and I need to have:
<gcXML:MD_Metadata xmlns:gcXML="http://www.test.com/Project/Catalog" xsi:schemaLocation="http://www.test.com/Project/Catalog file.xsd"

so I just remove the 'c:/test/'
How can I update this section of the XML?
Many thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2011
Added on Jun 16 2011
3 comments
315 views