Example#

class pyconverter.xml2py.ast_tree.Example(element, parse_children=True)#

Provides the example element.

Methods

Example.find(_type[, terms])

Find the first type matching a given type string.

Example.find_all(_type[, recursive, terms])

Find all types matching a given type string.

Example.get(entry)

Get an item from an element.

Example.has_children()

Return wether the element has children.

Example.print_tree()

Print the tree.

Example.rec_find(_type[, terms])

Find the first type matching a given type string recursively.

Example.to_rst([prefix, links, base_url, fcache])

Return a string to enable converting the element to an RST format.

Example.types_repr()

Return the string types.

Attributes

Example.added

Has the revision flag added.

Example.any_isalnum

Returns True if any characters are alphanumeric.

Example.children

Children of the tree.

Example.content

Text content.

Example.id

ID of the element.

Example.next_elem

Next element.

Example.prev_elem

Previous element.

Example.raw

Raw string of the element.

Example.tag

Element tag.

Example.tail

Tail of the element as a string.

Example.text_content

Text content.

Example.title

Element title.

Example.tostring

Attributes of the element as a dictionary.