Python validating xml parser
If set to a non-zero integer, the parser will report only those attributes which were specified in the document instance and not those which were derived from attribute declarations.
Applications which set this need to be especially careful to use what additional information is available from the declarations as needed to comply with the standards for the behavior of XML processors.
For each attribute, two list entries are presented: the attribute name and the attribute value.
(Older versions of this module also used this format.) By default, this attribute is false; it may be changed at any time.
The exception will be caught and printed like this: $ python is NOT well-formed!
test.xml:1002:2: mismatched tag This means that character 2 on line 1002 has a mismatched tag.
This is a simple, straightforward recipe that illustrates how to use the xmlval and xmldtd modules for validated XML parsing.This can improve performance substantially since Expat normally breaks character data into chunks at every line ending.This attribute is false by default, and may be changed at any time.The above recipe provides pretty much all the information you need to know for doing this.Users will want to "round out" the implementation of My App (or any other subclass of xmlproc.