Literal#

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

Provides the literal output element.

Methods

Literal.find(_type[, terms])

Find the first type matching a given type string.

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

Find all types matching a given type string.

Literal.get(entry)

Get an item from an element.

Literal.has_children()

Return wether the element has children.

Literal.print_tree()

Print the tree.

Literal.rec_find(_type[, terms])

Find the first type matching a given type string recursively.

Literal.to_rst([prefix])

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

Literal.types_repr()

Return the string types.

Attributes

Literal.added

Has the revision flag added.

Literal.any_isalnum

Returns True if any characters are alphanumeric.

Literal.children

Children of the tree.

Literal.content

Text content.

Literal.id

ID of the element.

Literal.next_elem

Next element.

Literal.prev_elem

Previous element.

Literal.raw

Raw string of the element.

Literal.tag

Element tag.

Literal.tail

Tail of the element as a string.

Literal.text_content

Text content.

Literal.title

Element title.

Literal.tostring

Attributes of the element as a dictionary.