XML is a fairly simple format. It uses plain Unicode text rather than binary encoding, and all the structures are declared with predictable-looking tags. Nonetheless, there are still enough rules in the XML grammar that a carefully debugged parser is needed to process XML documents -- and every parser imposes its own particular programming style. An alternative is to make XML even simpler. The open-source PYX format is a purely line-oriented format for representing XML documents that allows for much easier processing of XML document contents with common text tools like grep, sed, awk, wc, and the usual UNIX collection.
As part of the ongoing quest to create a more seamless integration between XML and Python, this article presents the xml_pickle module. The author discusses the design goals and decisions that went into xml_pickle and provides a list of likely uses.
This is the beginning of a short series on creating a software repository system built on Web services and developed in the Python programming language. This article shows you the details of using the 4Suite open-source XML server with Python to create Web service-based applications.
The first two installments of this column provided an overview of working with XML in Python. In the year since those initial writings, however, the state of XML tools for Python has advanced significantly. Unfortunately, most of these advances have not been backwards compatible. This special installment article revisits the author's previous discussion of XML tools, and provides up-to-date code samples.
This column presents some of the changes to the author's previous module suite, utilities for high-level Python handling of XML documents, as well as some tips on advanced aspects of using and customizing the modules. Code samples demonstrate py_obj._XML attributes, node attributes treated as objects and lists, py_obj magic attribute behavior, and more.