• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Beginner Seeking Help With XML Parsing

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 28368
99
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone interested in learning about the eXtensible Markup Language (XML) should read material at:

http://xml.coverpages.org/

Enjoy!
 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

 
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic