Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes XML and Related Technologies and the fly likes How to parse xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to parse xml" Watch "How to parse xml" New topic
Author

How to parse xml

Dorothy Taylor
Ranch Hand

Joined: Nov 26, 2007
Posts: 104
Hi

I have a requirement where i have a valid xml that I need to parse so that the elements of the xml can be made to behave in some manner. I need to know two things:

  • Which parser is best to use DOM, SAX etc.
  • Which parser library can I use. Here please note that my JRE can be 1.4 o 1.6. So my code should be compatible with these versions


  • Note that my xml may not be very big in size. It can have a maximum of 200 elements maybe

    Thanks
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: How to parse xml
     
    Similar Threads
    convert javaobjects to xml and xml to java objects dynamically
    XML file as String
    Need Help in XML Parsing
    XML Schema parsing
    SAX vs DOM