How may I update the schemaLocation in XMLtype field.
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