author: Michel Dagenais
copyright: Michel Dagenais, GNU General Public License, 1997
date: 8 October 1997
keyword: SGML
keyword: structure
keyword: verification
keyword: medium audience

# Sgmlstructure: Print the SGML Tree Structure for a Document

## Abstract

This program prints back an SGML file with annotations identifying all the SGML structure elements identified during the parsing. It may help verify the structure of an SGML document.

For each file name on the command line, the corresponding file is parsed and its content printed back on standard output along with BEGIN xxx and END xxx annotations indented to reflect the nesting level. These annotations identify the different parsing constructs, xxx being one of startDtd beginning of document type definition, endDtd end of document type definition, endProlog end of local markup declarations, startElement start element tag, endElement end element tag, data character data, sdata internal entity reference, pi processing instruction, externalDataEntityRef entity reference to external data, subdocEntityRef external entity reference, nonSgmlChar binary non SGML character code, commentDecl comment, markedSectionStart start of IGNORE/INCLUDE marked section, markedSectionEnd end of IGNORE/INCLUDE marked section, ignoredChars content within a IGNORE marked section, generalEntity general entity reference, error parsing error encountered, openEntityChange new entity processed.