Parsing XML
Saturday, December 19, 2009 14:34For one of my classes a project was to write two programs, one of which uses the document object model (DOM) API to parse an XML file and one which uses the Simple API for XML (SAX) API. The programs are just tiny and do not dod anything fancy. Basically just breaks down the content of the XML files into the elements, attributes, and content then displaying them in a very primative GUI.
Note that since this is a school project nothing beyond the requirements was added (hence no About section or anything like that).
Windows (all): DOM XML (exe), SAX XML (exe)
Linux (right click and open with Java): DOM XML (jar), SAX XML (jar)
Mac users should be able to use the same as Linux.
Windows users can use the jar version too if they prefer. When downloading the jar version, make sure it has the extension .jar (ie: in windows may try to download as .zip, replace zip with jar).
anonymous says:
January 3rd, 2010 at 9:35 PM
you might also want to try vtd-xml if DOM or SAX doesn’t work for you… (e.g. large documents, memory consuption)