1 Reply Latest reply on Feb 3, 2008 4:28 PM by Peter deHaan

    Delete in xml

      I try to delete a node in a xml like this :
      <elem1 id="1">
      <elem2 id="2">
      <node id="3"/>
      <text id="5"/>
      <mynode id="8"/>
      <other id="10"/>

      As you see the depth en node names are random. I know the attribute id and i d'like a simple operation to remove a node through it's id.

      i am looking for a syntax like :
      delete myXml..descendants("@id==5")
      delete myXml..@id==5;
      But the syntax is incorrect.
      I d'like to avoid browsing recursivly the XML tree. Could you help me ?