Description
Description
The goal of this project is to learn XPath, DOM, and SAX to query XML data.
This project must be done individually. No copying is permitted. Note: We will use a system for detecting software plagiarism, called Moss, which is an automatic system for determining the similarity of programs. That is, your program will be compared with the programs of the other students in class as well as with the programs submitted in previous years.
Note that, if you use a Search Engine to find similar programs on the web, we will find these programs too. So don’t do it because you will get caught and you will get an F in the course (this is cheating). Don’t look for code to use for your project on the web or from other students (current or past). Just do your project alone using the help given in this project description and from your instructor only.
Platform
You will do this project on your own PC/laptop. You may use a text editor to develop your Java programs but you may use an IDE, such as Eclipse or Netbeans, if you want.
Here are some examples:
An XPath query evaluated in Java
A simple example of DOM in Java
A simple example of SAX in Java
The cs.xml XML document used in Java
Documentation
The following web pages provide some tutorials. Use them as a reference only.
XPath Tutorial
Another XPath Tutorial
Java API for javax.xml.xpath
XML DOM Tutorial
DOM Java binding
Package org.w3c.dom
Package org.xml.sax
Project Requirements
First, download the following XML document along with its DTD that describes journal articles:
SigmodRecord.xml.
SigmodRecord.dtd (the DTD of the document).
Note: the links are NOT broken. Just right click and use “Save Link As” to save the XML and DTD files on your PC.
Express the following queries:
Print the titles of all articles in volume=13/number=4 whose one of the authors is David Maier.
Print the author names off all articles whose title contains the word “database” or “Database”.
Print the volume/number and the init/end pages of the article titled “Research in Knowledge Base Management Systems.”.
in Xpath, DOM, and SAX using Java.
What to Submit
Use the form below to submit your Java file(s). We do not accept email or hardcopy submissions. You may submit your files as many times as you like, but only the most recently submitted files will be retained and evaluated (newly submitted files replace the old files under the same file name). After you submit the files, please double-check that your submitted files are correct by clicking on the Status link.