Skip to main content

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.

Source Distribution

compactxml-1.1.2.tar.gz (37.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page