XML Solutions in Python

Python's XML support is probably one of the most complex of the different solutions available, largely because of the way in which the different XML parsers have been developed. The original XML parsing system provided with Python 1.5.2 is called xmllib, and it comes as standard with all Python distributions. xmllib was developed on the same basis as the sgm-llib module, which provides SGML parsing tools. The xmllib parser is both a simple validation parser and an event-driven data parser that...

Using xmlproc for Validation

When working with any kind of XML document, there are always issues relating to the validity of the document being parsed. Most of the parsers will check a document for well-formedness, including SAX, which is used both directly and for building the DOM object model for the Python DOM implementation, and Expat. This involves simply checking that start tags have corresponding end tags and that tags don't overlap each other (start and end tags in different orders). These basic checks are...