Table of Contents
- This is a xml parser that creates a database and accepts query.
- Only one attribute is supported per element.
- Attributes supported in the xsd files are name, type, fixed, default and use.
- Type reference to another element is not permitted in the xsd.
- Use the DbInterface class to access the database.
- Input xsd and xml files are given try to follow then or you might get a syntax or semantic error
- To make the
xmlParser
executable
make
- To clean derived files
make clean
There are 3 ways to give Input (!!!Caution xml
filename must follow xsd
filename)
- Parse
xsd
andxml
files without verbose
./xmlParser input.xsd input.xml
- Parse
xsd
andxml
files and see trace parsing verbose
./xmlParser -p input.xsd input.xml
- Parse
xsd
andxml
files and see trace scanning verbose
./xmlParser -s input.xsd input.xml
There are 2 types of query you can make
- element query
.childElementName
- specific element with attribute query
.childElementName(attribute_value)
- If query successful then all the results will be shown.
- If query results are complex type then those cannot pe printed as strings.
- Enter
-q
to quit the program.
Query example (To get results from the below queries you have to use the given xsd and xml files)
- shiporder.shipto.name
- shiporder(889923).shipto.name
- shiporder(889923).orderperson