I have one tag in my table having clobe xml data like as below:
I need to update this value to 400. I am doing it as below. But its not updating. Please help.
UPDATE XYZ SET request_xml = UPDATEXML(xmltype(request_xml), 'Parameters/Parameter[@Name="ABC"]/@Value', 400,'xmlns:n0="http://www.iQWE.com/LKJ"').getClobVal() where transaction_id = '2017051907471800000000187725';
Your XPath doesn't make much sense. You are looking for a node called
Parameterwith an attribute calledName, where that attribute value is'MaxLatenessAllowed'. There is nothing like that in your XMl document.You can supply the full path to the node you want to change, including namespace info:
Or to shorten that you can look for that node name anywhere, if that's safe in your schema:
The
updateXML()function is deprecated, so you might want to investigate other ways of achieving this.