Skip to content
Advertisement

How to delete more than one node with xml-query

with this code, I can remove one node (field_without_interest) of this xml element. But I would like to remove two nodes now( field_without_interest and PERSON_NUMBER). I have tried to place the for loop at differents places (You can see that in code. But I don’t think it useful to for to write every attemps in stackoverflow) but to no avail.

code

Advertisement

Answer

You may specify path alternatives in the modify clause to select nodes to delete:

| INTERESTED_ELEMENTS                                                                                      |
| :------------------------------------------------------------------------------------------------------- |
| <?xml version="1.0"?><ROWSET><ROW><LOAN_1>25000</LOAN_1></ROW><ROW><LOAN_1>25000</LOAN_1></ROW></ROWSET> |

db<>fiddle here

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement