I´m trying to update into XML an element that has a namespace and a value that I will update in an attribute of the element.
It would be simpler if the same element there were several different namespaces.
This is a trex XML that illustrates my situation.
-----
<?xml version="1.0" encoding="ISO-8859-1"?>
<nmf:Mensagens xmlns:nmf="http://www.nmf.com/schemas" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nmf.com/schemas http://www.nmf.com/schemas/sample1.xsd">
<nmf:diversos_elementos>"diversos valores"</nmf:diversos_elementos>
</nmf:Mensagens>
-----
I need to change the path of the SCHEMA that points to "http://www.nmf.com/schemas" to point to my local machine, getting "http://localhost/XSD"
Following the documentation of the oracle came to this command:
-----
UPDATE table_xml
SET xml_data = UPDATEXML(xml_data
,'/nmf:Mensagens/@xmlns:nmf/text()'
,'http://localhost/schemas'
,'nmf="http://www.nmf.com/schemas" xmlns="http://www.w3.org/2001/XMLSchema-instance"'
);
-----
Does anyone know how to solve this?
I look back.