The goal of this laboratory assignment is to perform simple XML parsing on an XML document using a SAX parser (event based). Use of the Xerces XML parser is recommended for this assignment, as a version of this parser has been made available in the class locker for this course. Xerces supports both DOM and SAX styles of parsing, but you are only expected to use the SAX parsing capability for this assignment.
If you're performing this assignment on the CATS machines (such as unix.ic), you should first perform the following setup steps.
The example SAX parsing program shown in lab can be found here. When run with this input file, it produces the following output file. The example is described in more detail at its source, on SAXproject.org.
A friend with an extensive collection of music recordings needs to sell off various pieces. She has asked you for help in setting up a system to help her scan through her catalog in XML format. Fortunately, she found that she could adopt the Amazon.com web services XML format to represent her collection, so it contains the same information available on that site. She has provided you with this sample xml document for your use.
Your task is to write a short program in Java using a SAX parser that will analyze the XML input file and output the following to standard output (print to the console)
These can be found with the following XML elements and attributes:
For the assignment please submit your program, the generated output, and a short readme file showing what you need to do on the command line to compile and run the program. Using a makefile is recommended but not required.
Last modified: