How can I remove a node from xmltype using PL/SQL? Example:
<people>
<person>
<personNO>1</personNO>
</person>
<person>
<personNO>2</personNO>
</person>
</people>
I try to remove whole node person if /people/person/personNO is 1. My xml document is in the l_xml xmltype variable. So far I've got:
SELECT deletexml(l_xml, '/people/person[personNO="1"]')
INTO l_xml
FROM dual;
It doesn't seem to work at all. Can you please suggest any solution?