Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Other JSE/JEE APIs and the fly likes Java XML doc processing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "Java XML doc processing" Watch "Java XML doc processing" New topic
Author

Java XML doc processing

M Burke
Ranch Hand

Joined: Jun 25, 2004
Posts: 375
I need an example of how Java reads in an XML file and accesses the nodes. Anyone have one?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

There are several ways. Here's a whole book about the subject:

http://www.cafeconleche.org/books/xmljava/chapters/index.html
payal agrawal
Ranch Hand

Joined: Oct 11, 2005
Posts: 44
Look at the URLs below:

Parsing XML with a simple SAX document handler
http://www.java-tips.org/content/view/517/2/

Reading a DOM tree from XML document
http://www.java-tips.org/content/view/437/2/

Reading a document from XML file with SAX
http://www.java-tips.org/content/view/811/29/

Reading a document from XML file with DOM
http://www.java-tips.org/content/view/812/29/
[ December 09, 2005: Message edited by: payal agrawal ]
M Burke
Ranch Hand

Joined: Jun 25, 2004
Posts: 375
Thanks guys, I will look through it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java XML doc processing
 
Similar Threads
validation
interpretation of command line parameter
XML and Java
A special thanks to Carl Trusiak
XML validation