wood burning stoves
The moose likes Product and Other Certifications and the fly likes remove an element from xml(JDOM) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Product and Other Certifications
Reply locked New topic

remove an element from xml(JDOM)

Soumya Madhu

Joined: Dec 24, 2008
Posts: 7
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">
<fielld name="f1"/>
<fielld name="f2"/>
<fielld name="f2"/>

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

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: remove an element from xml(JDOM)
It's not a secret anymore!