XML & Web services: Remove elements of DOM using XPAth

  1. Remove elements of DOM using XPAth (1 messages)


    I have below XML structure

    Structure may have many <Detail> elements.

    Now I want to remove all <Detail> elements which falls under a specific criteria (for ex: Name value ='A' or Age>15 etc.

    Do we have any API which allows me do this. Some thing like removeElement(document, XPath).

  2. Hi Anirudha-

    The working draft of the XQuery update facility says that the XQuery update mechanism will provide DELETE support. I'm unsure, however, if there is any java implementation of an XQuery API which provides this, yet. You might try looking at the DataDirect XQuery Page.