A simple and compact XML parser.
Project description
XMLX - a simple and compact XML parser.
XMLX = XML eXtras
To initialize an element object from a string:
``>>> xmlx.Element('<html>hello!</html>')``
``<html>..</html at 0x...>``
If you prefer dictionaries, simply use ``xmlx.elemdict(text)``:
``>>> xmlx.elemdict('<html>hello!</html>')``
``{'?':{},'@':'hello!','*':'<html>hello!</html>'}``
``?`` is the element's attributes, ``@`` is its content (JS innerHTML), and ``*$
See help(xmlx) for further documentation.
XMLX = XML eXtras
To initialize an element object from a string:
``>>> xmlx.Element('<html>hello!</html>')``
``<html>..</html at 0x...>``
If you prefer dictionaries, simply use ``xmlx.elemdict(text)``:
``>>> xmlx.elemdict('<html>hello!</html>')``
``{'?':{},'@':'hello!','*':'<html>hello!</html>'}``
``?`` is the element's attributes, ``@`` is its content (JS innerHTML), and ``*$
See help(xmlx) for further documentation.
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
xmlx-0.1.0.tar.gz
(4.2 kB
view hashes)