Readme for Matra - An XML DTD Parser Utility

Version 0.8b, 0.8.1b

Matra is an XML DTD Parser utility written in java.

You can use Matra to do broadly the following tasks:

  1. Parse the DTD
    Matra will parse the DTD and check for problems. It notifies the user of any problems with the DTD).

  2. Merge the DTD
    Many of the published DTDs are split into multiple modules. Using the "merge" functionality of Matra, you can create a DTD that contains all the Element types and attribute declarations in the DTD and all of its included modules.

  3. Generate the DTD Tree
    Matra creates a visual representation of the DTD. This is depicted as a tree - where all the nodes are the element types. The attributes are displayed next to the element name within parenthesis.

In this release I have included batch files and shell scripts for you to easily perform the above three functionality.

Web Sites

Project Site:
Bug reports:
Request for Enhancements:

RSS Feeds

Feed List:
Project News:
Project File Releases:
Project Summary (and basic statistics):
Project Documentation:

Mailing lists:


Version 0.5a, 0.6a, 0.7a

Matra is a DTD Parser written in java. I have used JDK 1.3.1 for Compilation and used JUnit 3.8.1 for compiling the unit test cases (present in the com.conradroche.matra.test.* packages).

This release of Matra comes with a command line utility that will help you to parse the DTD files without writing any code. It also provides the ability to present a merged view of a DTD - in case the DTD has a lot of included modules. Another funtinality that it provides is to display a simple Tree structure of the DTD - I find this functionality extremely helpful in understanding a new DTD.

You can find details for the Matra command line utlity in

If you need to use the Matra dtd parser in your program, you may want to see the examples provided in the com.conradroche.matra.example package.

You'll see three sample classes -

SimpleMatraEg -
A very simple parsing example. It parses a DTD stream which is available as a String.

ParseDTDFile -
This example shows how to use the Matra DTDParser for parsing dtd files.

ParseDTDUrl -
This example shows how to use the Matra DTDParser for parsing dtd files present on the web for which a URL is known.