File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Java & XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Java & XML" Watch "Java & XML" New topic

Java & XML

Gemini Rana

Joined: Jul 30, 2005
Posts: 1

Can anybody help me out with XML programming. I want to read a XML file and search through it or delete a node in it or a add a new node in it or modify the value of a existing node in it. Could anyone help me out from this dreaded situation. I m relatively new to XML programming with JAVA but not JAVA.


Live to life and not life to live
Makarand Parab
Ranch Hand

Joined: Dec 10, 2004
Posts: 121
There are 2 ways to work with XML, one is SAX and other is DOM. Looking at ur problem u need to work with DOM. In dom, the whole xml data is loaded in the memory as a DOM object, then u can add a node, delete a node, update data in it.
U can read more details on DOM and then code your application. Let me know if u need any help. I would look forward to help u out. u can mail me at


Makarand Parab
sweta naidu

Joined: Nov 02, 2004
Posts: 25
Use JDOM api.browse through the documentation and look for examples that will give you an idea.
Baps Vakkalagadda
Ranch Hand

Joined: May 25, 2004
Posts: 47
Try JAXB. It is more efficient than DOM and easier than SAX.
I agree. Here's the link:
subject: Java & XML
It's not a secret anymore!