so the whole person node for person no = 1 was deleted. if you intended to wipe out every node if personNO 1 existed in any of them, then you want to set the xpath to /people/person[../person/personNO="1"]

That's weird, becouse by "doesn't work at all" i meant "does completly nothing". For me that piece of code did not give the desired output.
–
JandrejcApr 11 '13 at 14:47

@Jandrejc - doesn't give the desired output, or doesn't give any output? Do you have server output turned on so you see the dbms_output? (set serveroutput on in SQL*Plus)
–
Alex PooleApr 11 '13 at 14:54

Doesn't give desired output. It gives me original xml, with node which was supposed to be removed.
–
JandrejcApr 11 '13 at 14:56

@Jandrejc that whould suggest a bug that you need Oracle support to look at. what oracle version are you on? i assume your real XML does not use namespaces, because if it does, you need to declare those in order for the xpath to match the node correctly.
–
DazzaLApr 11 '13 at 14:58