Hello Everyone,
just a few days ago someone told me how to delete an entire document using an XQuery Update statement (thanks Christine!).
The key thing to know is that you must delete on the document root, not on the root element.
So this expression will delete the document:
declare namespace tf="http://namespaces.softwareag.com/tamino/TaminoFunction"
update for $i in input()/genericData[name='Dummy']
where tf:getInoId($i) = 2036
do delete $i/..
In this expression $i refers to the root node “genericData” and we need to have the document root - which is the parent node of the root node, so “/…” will get that.
I hope this tip helps!
Trevor.
#API-Management#webMethods#webMethods-Tamino-XML-Server-APIs