Parser and converter for an alternate compact XML syntax.
Project description
Summary
A bidirectional converter for an alternate compact XML syntax, based on significant whitespace to show nesting.
For example, the following:
<element @attribute=value "Text.
Is equivalent to the following XML:
<element attribute="value">Text.</element>
Install
compactxml is a pure python library, and should be platform independent. It has been developed on python 2.6.2 on linux, however. As dependencies, it requires that lxml and pyparsing be installed to function.
A normal python setup.py install command should work to install the library.
Usage
There is a compactxml.expand function for converting from compact XML syntax to XML, and a compactxml.compact function for converting from XML to compact XML syntax, with variations on both depending on the output format desired. help( compactxml) will give better usage instructions, and the included documentation in compactxml.rst provides a comprehensive overview of the compact xml syntax.
There is also a command line utility compactxml.py in the source distribution which can be used for converting from/to compact xml syntax.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.