Welcome to Drill’s documentation!

Contents:

class drill.DrillContentHandler
characters(ch)
endElement(name)
startElement(name, attrs)
class drill.XmlElement(name, attrs=None, data=None, parent=None, index=None)
append(name, attrs=None, data=None)

Called when the parser detects a start tag (child element) while in this node.

characters(ch=None)

Called when the parser detects character data while in this node.

children(name=None, reverse=False)

Generator yielding children of this node, optionally matching the given tag name.

finalize()

Called when the parser detects an end tag.

find(name=None)

Generator yielding any descendants of this node with the given tag name.

first(name=None)

Returns the first child of this node, optionally matching the given tag name.

insert(before, name, attrs=None, data=None)

Inserts a new element as a child of this element, before the specified index or sibling.

items()

Generator yielding key, value attribute pairs, sorted by key name.

last(name=None)

Returns the last child of this node, optionally matching the given tag name.

next(name=None)

Returns the next sibling of this node, optionally matching the given tag name.

prev(name=None)

Returns the previous sibling of this node, optionally matching the given tag name.

write(writer)

Writes an XML representation of this node (including descendants) to the specified file-like object.

xml(**kwargs)

Returns an XML representation of this node (including descendants).

class drill.XmlWriter(stream, encoding='utf-8', pretty=True, indent=' ', level=0, invalid='', replacements=None)
data(data, newline=False)
end(tag, indent=False, newline=True)
simple_tag(tag, attrs={}, data=None)
start(tag, attrs, newline=False)
drill.parse(url_or_path, encoding=None)

Indices and tables

Project Versions

Table Of Contents

This Page