Oracle updates xml nodes. oracle updates xml nodes.
Some nodes are like <emali/>, so direct
update table1 e set e.xxx_xml=updatexml(e.xxx_xml,'/data/contact/email/text()','value')where 1=1;
It cannot be updated.
update table1 e set e.xxx_xml=updatexml(e.xxx_xml,'/data/contact/email','<email>'|| 'value' || '<email/>')where 1=1;
In this way, the update will be available.
Xml node extraction in oracle
Read xml data into memory and parse it using the msdom object
In oracle PL/SQL, how does one directly obtain the value of a node in xml based on the node name?
It is simpler to use XPath. You can also use xmldom.
Xmltype ('<? Xml version = "1.0" encoding = "GBK"?>
<SERVICE>
<IDA_SVR_USERBILL>
<CALL_METHOD> queryProcessStepList </CALL_METHOD>
</IDA_SVR_USERBILL>
</SERVICE> '). extract (' // CALL_METHOD/child: text () '). getstringval ()
Test:
SELECT xmltype ('<? Xml version = "1.0" encoding = "GBK"?>
<SERVICE>
<IDA_SVR_USERBILL>
<CALL_METHOD> queryProcessStepList </CALL_METHOD>
</IDA_SVR_USERBILL>
</SERVICE> '). extract (' // CALL_METHOD/child: text () '). getstringval ()
FROM dual;
If you want xmldom
You can refer to my statement:
Www.skyz.cn /? P = 364