wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Beginner Seeking Help With XML Parsing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Beginner Seeking Help With XML Parsing" Watch "Beginner Seeking Help With XML Parsing" New topic
Author

Beginner Seeking Help With XML Parsing

Russ Russell
Ranch Hand

Joined: Jan 24, 2010
Posts: 72
Hi,
I've been programming in Java for a few years now, but I have no experience with parsing XML. I have tried some code snippets that I have found online with very little luck.

Where do I start with XML? Is there a specific API that I need? Can someone point me to some working code examples that will read an XML doc, and parse & display the results?

Thank you!
Mazer Lao Tzu
Ranch Hand

Joined: Jan 20, 2010
Posts: 35
The most common API I have seen and used to parse XML is Apache's digester. I would recommend looking at that as a good start to parsing XML. Many of the posts in this forum should help you as well.



-- Mazer
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Digester the most common Java-XML API? I don't agree with this at all.

It's surprisingly difficult to use the obvious keywords of "java xml tutorial" to find a Java XML tutorial, but here's a reasonably good-looking one from the first page of the links I got:

http://www.totheriver.com/learn/xml/xmltutorial.html
Nishant Modak
Greenhorn

Joined: Sep 29, 2006
Posts: 27
If you haven't worked on any XML API. Would suggest you to briefly read through some tutorials which talk about JAXP, JAXB , DOM, SAX and Stax.
And then jump onto coding . It will help you come up to speed and use any API for that matter - once you 'get' a hang of what this is all about.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Anyone interested in learning about the eXtensible Markup Language (XML) should read material at:

http://xml.coverpages.org/

Enjoy!
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

Nishant Modak wrote:If you haven't worked on any XML API. Would suggest you to briefly read through some tutorials which talk about JAXP, JAXB , DOM, SAX and Stax.
And then jump onto coding . It will help you come up to speed and use any API for that matter - once you 'get' a hang of what this is all about.


I agree with the above post,

I found DOM to be great in the starting, but then SAX caught my eye,
There is an approach to parse XML (in SAX) to form your own beans using a stack, you might want to look at that.


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Beginner Seeking Help With XML Parsing
 
Similar Threads
does JDK has some XML parsing and XPath or we should use libraries like Xalan... ?
EXTRACTING DATA FROM XML FILE
XML and SOAP Attachment
Generic XML parsing
Json