aspose file tools*
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
Author

Java & XML

Gemini Rana
Greenhorn

Joined: Jul 30, 2005
Posts: 1
Hi,

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.

bye


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

Joined: Dec 10, 2004
Posts: 121
Hi RANA
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 makarandparab@indiatimes.com.

Enjoy

Regards
Makarand Parab
sweta naidu
Greenhorn

Joined: Nov 02, 2004
Posts: 25
Rana,
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: http://aspose.com/file-tools
 
subject: Java & XML