Delete XML node based on position in Java

Posted by Travis on Stack Overflow See other posts from Stack Overflow or by Travis
Published on 2010-05-15T04:57:22Z Indexed on 2010/05/15 5:04 UTC
Read the original article Hit count: 177

Filed under:
|
|

I have an XML file like this:

<A>
  <B>
    <c>1<c/>
    <d>2<d/>
    <e>3<e/>
  </B>
  <B>
    <c>11<c/>
    <d>22<d/>
    <e>33<e/>
  </B>
</A>

Say I wanted to delete the second node. How would I do this?

© Stack Overflow or respective owner

Related posts about java

Related posts about Xml