Skip to Main Content

DevOps, CI/CD and Automation

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!

update element containing namespace and value in attribute .

724105Sep 23 2009 — edited Sep 25 2009
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2009
Added on Sep 23 2009
5 comments
3,586 views