[jdom-interest] Need help removing
Andres March
Andres at ehealthcontracts.com
Wed May 22 11:14:29 PDT 2002
This is very simple using XPath but can also be done using straight Java. Do you have a method you prefer?
-Andres
-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Jeff Ellman
Sent: Wednesday, May 22, 2002 10:10 AM
To: jdom-interest at jdom.org
Subject: [jdom-interest] Need help removing
Here's my dilemma. I need to be able to delete and element and it's
children. The element that I want to delete will be identified by value
given to one of its child elements.
Here's a sample of an XML document that I pretty much have to work with:
<calendar>
<!-- year attribute cannot be blank -->
<year num="">
<!-- month attribute cannot be blank -->
<month num="">
<event>
<!-- Date value cannot be blank -->
<date></date>
<meetingName></meetingName>
</event>
</month>
</year>
</calendar>
Here's another look at the XML document in application:
<calendar>
<!-- year attribute cannot be blank -->
<year num="2001">
<!-- month attribute cannot be blank -->
<month num="12">
<event>
<!-- Date value cannot be blank -->
<date>12</date>
<meetingName>Meeting 1</meetingName>
</event>
<!-- I want to delete this next event element and it's children -->
<event>
<!-- Date value cannot be blank -->
<date>12</date>
<meetingName>Remove event with this meetingName</meetingName>
</event>
</month>
</year>
</calendar>
How do I remove the even element based upon that event's meetingName? Any
help in this matter would be greatly appreciated. Thanks!
Sincerely,
Elvis
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
More information about the jdom-interest
mailing list