File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

remove an element from xml(JDOM)

 
Soumya Madhu
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
I want to remove an element from xml(JDOM).which method I should use?

I have tried removeChild(). It will remove only first element. So I tried removeContent(index). It also not worked.
Suppose the xml is shown below:

<table name="t1">
<fiellds>
<fielld name="f1"/>
<fielld name="f2"/>
<fielld name="f2"/>
</fiellds>
</table>

I want to remove the field with name f1 or f2 or f3 conditionally.
Anyone please hepl me?.

Regards
Soumya
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question to multiple forums: CarefullyChooseOneForum. Note that this forum is about XML certifications, which have nothing to do with your question.

Let's continue the discussion in this duplicate thread.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic