XML document

Top  Previous  Next

Examples > XML > XML document


The start rule for the XML parser is: document. After you have parsed the start rule as usual by




not all names in the syntax tree are preceded by a square to open the structure of the production.




The reason is, that the XML grammar consists of two overlapping parts:


the part for the real document and
the part for a DTD (document type definition), which is written in an external file and defines tags and attributes for the document


Many XML documents don't need external DTD's and here only the first part shall be examined. The other rules have remained for interested user in the project.


At first glance both the grammar and the document appear quite confusing.

The TextTransformer project can help, to make them clearer. The structure can be shown in the variable-inspector. For this a node breakpoint is set on an action at the end of the start rule.





Now you can execute the program up to the breakpoint




and open the variable inspector.




Now choose to view the local variables:




and double click on the value side on one of the nDoc-lines.




The result is a tree view of the XML document.








This page belongs to the TextTransformer Documentation

Home  Content  German