lab4.468 - . . Spring 2008 . CSC 468: DBMS Implementation...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
. . Spring 2008 CSC 468: DBMS Implementation Alexander Dekhtyar . . Lab 3: XML DOM Practice Due date: Thursday, April 24, end of lab period. . Lab Assignment The purpose of this assignment is to learn XML DOM and SAX APIs and use them to traverse, analyze and extract information from XML documents. What to look for Programs that work with XML data, do not directly access XML Fles stored on disk. Instead, XML data is read once, parsed into an internal data structure and this data structure is accessed and traversed by the program. The internal data structure is known as DOM, Document Object Model, or DOM Tree. The API is known as DOM API. DOM API is a World Wide Web Consortium standard. The portion of the DOM API that is of interest to us includes main interfaces (in Java sense of this word) for representing XML Nodes : elements, text, attributes, etc., as well as interfaces for representing lists of XML nodes and collections of attributes . The key DOM API functionality can be broken into two categories: DOM Tree Manipulation. This category includes methods for cre- ation and modiFcation of the DOM tree. Creation of individual XML nodes, their insertion into DOM trees, deletion of XML nodes from DOM trees, and changes in the node content can be done via DOM API methods. DOM Tree Traversal. This category includes methods for traversal of DOM trees. Given a node in a DOM tree, DOM API allows to retrieve information about (and ”move to”) its parent, its children, its siblings. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Stage 2 of the course project will involve implementing an API of XML access methods. Some (and possibly all) of the methods in this API will come from the DOM API. It is therefore important that you have Frst-hand knowledge of DOM API and the work of individual tree manipulation and tree traversal methods. The Tasks This is a team lab: each project team needs to submit only one assignment. Your task is to write a number of Java programs which accept as input an XML Fle and produce output as speciFed below. XMLElmentHistogram The Frst program you shall implement is XMLElementHistogram . This pro- gram accepts as input an XML Fle, parses it into a DOM tree, and outputs the list of all XML element names found in the XML Fle. ±or each XML element, the program prints the number of times it is found in the XML document. The XML elements are outputed in the descending order of the number of occurrences.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/19/2008 for the course CSC 468 taught by Professor Dehktyar during the Spring '08 term at Cal Poly.

Page1 / 7

lab4.468 - . . Spring 2008 . CSC 468: DBMS Implementation...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online