I have xml file in which i want to edit or add or delete the contents..

Hi
I need your help, How to remove some contents and modify some contents from xml file...
<book>
<peson>
<name> AAA</name>
<age>12 </age>
</person>
<peson>
<name> DAA</name>
<age>21 </age>
</person>
<peson>
<name> CAA</name>
<age>32 </age>
</person>
<peson>
<name> CAA</name>
<age>21 </age>
</person>
This is my xml file, i want to remove whole <person> if the age is 21 ... and modify some name based on age..How to do in java ......... Please advise me...I will be thankful to you in this regards.

Here you can read about java + xml
http://java.sun.com/developer/codesamples/xml.html
do note that your xml does not look well formed to me, and will most likely raise errors.

Similar Messages

Maybe you are looking for

  • Can i use two 2gb ddr3 on my lenovo g400 ??

    and can i use ddr3 and ddr2 on my lenovo g400??

  • Canon 5D mark II raw file conversion size blowout

    I am suffering from an issue where my CR2 files from a 5D decrease in size when converted to DNG  from for example 14.4MB to 11.8MB while the 5D mark II files increase from 8.7MB to a much larger 23.6MB after conversion. Both conversions are being do

  • Macbinary file in home directory

    Hello, I have noted lately that there is a mac binary file in my home directory, does anyone know what is this for? I did not notice this file a month and half ago. Everything else is ok with my mac but I am very curious about this file. I tried open

  • My Finder Icon in desktop invincible

    My Finder Icon in my Desktop won't show up, but i can use it and the dot under it glows. I've Tried re-booting, Safe boot aswell But it won't work. I messed up trying to change the icon picture with the iOS 7 Finder Picture, ended up that the icon no

  • AVERAGE on crosstable with NULLs

    Hi, I try to set average function on column in crosstable. Data contains NULLs. I got error during displaing report in HTML format (in Interactive format it's ok) - "oracle.xdo.XDOException: java.lang.reflect.InvocationTargetException". Oracle suppor