Caution#

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

Provides the caution element.

Methods

Caution.find(_type[, terms])

Find the first type matching a given type string.

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

Find all types matching a given type string.

Caution.get(entry)

Get an item from an element.

Caution.has_children()

Return wether the element has children.

Caution.print_tree()

Print the tree.

Caution.rec_find(_type[, terms])

Find the first type matching a given type string recursively.

Caution.to_rst([prefix])

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

Caution.types_repr()

Return the string types.

Attributes

Caution.added

Has the revision flag added.

Caution.any_isalnum

Returns True if any characters are alphanumeric.

Caution.children

Children of the tree.

Caution.content

Text content.

Caution.id

ID of the element.

Caution.next_elem

Next element.

Caution.prev_elem

Previous element.

Caution.raw

Raw string of the element.

Caution.tag

Element tag.

Caution.tail

Tail of the element as a string.

Caution.text_content

Text content.

Caution.title

Element title.

Caution.tostring

Attributes of the element as a dictionary.