Download Project 1: Recursive Descent XML Parser | CSE 687 and more Study Guides, Projects, Research Engineering in PDF only on Docsity!
CSE687 - Object Oriented Design S 2002
Project #1 – Recursive Descent XML Parser due
Monday, Feb 11
Purpose:
This project requires you to build a recursive descent parser for XML. XML is
a tagged language^1 that is very useful for saving structured data in files or
sending such data to remote locations via socket-based protocols. This
project requires you to support the exchange of structured data between an
ASCII file containing an XML document and an in-memory representation.
You are required to use a parse tree for the in-memory representation, and
to provide an interface that supports the exchange of structured data both
ways, e.g., from an XML document string to parse tree form and back again.
You are required to build a program that reads a directory, finds all the *.h
and *.cpp files, and saves their names, dates, and sizes in an XML document
in an ASCII file. You are required to use the XML parser to build the ASCII file
and then to read the file back and display its contents.
Requirements:
Your PARSE program:
shall compile and link from the command line, using VC++ 6.0, as provided in the ECS clusters and operate in the environment provided there.
shall use services of the C++ iostream library for all input and output to and from the user’s console and C++ operators new and delete for all dynmic memory management.
shall consist of at least one class representing parse trees and at least one class that manages XML parsing (XML string to parse tree) and XML composition (parse tree to XML string)^2. You are encouraged to define other classes as well.
The parse tree and/or XML composition classes shall support the programmatic creation of XML documents and addition and deletion of XML elements as either siblings or children of existing elements.
The PARSE program shall notify the user if it encounters ill-formed XML at either the parse or composition stages.
The PARSE program shall provide at least the following modules: a. a module to package the parse tree and node structure b. a module to package the XML parsing class(es) c. an executive module that supports the handling of files and display either directly, or indirectly through the use of helper modules.
shall accept, from the command line, a path name to search for files, but use the default directory if no path is specified.
shall display the XML document string and corresponding list of all the *.h and *.cpp files found. (^1) We will discuss XML briefly in class. (^2) You will find the xmlTran module in lecture1 folder useful for this project.