XML parser
Input tree must be a root tree with a text tree as child containing the document to be parsed. The parser generates from the input string a tree of a wellformed XML document, processes the DTD (parameter substitution, conditional DTD parts, ...) and substitutes all general entity references. Next step is character reference substitution. Last step is the document validation. Validation can be controlled by an extra parameter.
Example:
parseXmlDocument True -- parse and validate document
parseXmlDocument False -- only parse document, don't validateThis parser is useful for applications processing correct XML documents.