etree - Add-ons for the ElemenTree library

Utilities for the ElementTree standard library package.

util - Various utilities

ElemenTree related utility classes and functions.

Requires at least Python 2.6. Simple import breaks on Python 2.5

class ContainerElementMixin(parent, root_tag, namespace='')[source]
__init__(parent, root_tag, namespace='')[source]
__len__()[source]
class MappingElement(parent, root_tag, namespace='')[source]
__abstractmethods__ = frozenset([])
__delitem__(key)[source]
__getitem__(key)[source]
__init__(parent, root_tag, namespace='')[source]
__iter__()[source]
__setitem__(key, value)[source]
class MappingElementIterator(element)[source]
__abstractmethods__ = frozenset([])
__init__(element)[source]
next()[source]
class Namespace(url='', element=None)[source]

Represents an XML namespace and provides several utility functions that help handle a document without namespace tags.

Element(tag, attrib={}, **extra)[source]
SubElement(parent, tag, attrib={}, **extra)[source]
__init__(url='', element=None)[source]
find(element, tag)[source]
findall(element, tag)[source]
findtext(element, tag, default=None)[source]
get_tag(element)[source]
class QName(tag)[source]

Represents a qualified name

__init__(tag)[source]
__str__()[source]
text[source]
class SequenceElement(parent, root_tag, element_tag, namespace='')[source]
__abstractmethods__ = frozenset([])
__delitem__(index)[source]
__getitem__(index)[source]
__init__(parent, root_tag, element_tag, namespace='')[source]
__setitem__(index, value)[source]
insert(index, value)[source]
class Writer(root_tag, attributes=None, tab_size=0)[source]
__init__(root_tag, attributes=None, tab_size=0)[source]
write(node, where)[source]
make_property(elem, key=None)[source]

Creates a property on the text of element ‘elem’ or, if the ‘key’ argument is given, on its ‘key’ attribute.

Table Of Contents

Previous topic

command - Wrap complex commands in Python objects

Next topic

maven - Tools to execute the Maven build tool and manipulate its configuration

This Page

This Project