xml
- XML related utility classes¶
XML related utility classes.
util
- Various utilities¶
XML utility classes and functions.
Requires at least Python 2.6. Simple import breaks on Python 2.5
-
class
ContainerElementMixin
(parent, root_tag, namespace='')[source]¶ Mixin class for container workalikes backed by a DOM.
-
class
MappingElement
(parent, root_tag, namespace='')[source]¶ Provide a tag/text map for the children of the ‘root_tag’ descendent of ‘parent’. Given:
<parent> <root_tag> <key1>value1</key1> <key2>value2</key2> </root_tag> </parent>
One could write:
mappingElement["key1"] == "value1"
-
__abstractmethods__
= frozenset([])¶
-
-
class
MappingElementIterator
(element)[source]¶ Iterator over a ‘MappingElement’.
-
__abstractmethods__
= frozenset(['next'])¶
-
-
class
Namespace
(url='', element=None)[source]¶ Represent an XML namespace and provide several utility functions that help handle a document without namespace tags.
-
class
SequenceElement
(parent, root_tag, element_tag, namespace='', indent=' ')[source]¶ Provide a sequence of the values of the children tagged ‘element_tag’ of the ‘root_tag’ descendent of ‘parent’. Given:
<parent> <root_tag> <tag>value1</tag> <tag>value2</tag> </root_tag> </parent>
One could write:
sequenceElement[1] == "value2"
-
__abstractmethods__
= frozenset([])¶
-