Code#

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

Provides the code element.

Methods

Code.find(_type[, terms])

Find the first type matching a given type string.

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

Find all types matching a given type string.

Code.get(entry)

Get an item from an element.

Code.has_children()

Return wether the element has children.

Code.print_tree()

Print the tree.

Code.rec_find(_type[, terms])

Find the first type matching a given type string recursively.

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

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

Code.types_repr()

Return the string types.

Attributes

Code.added

Has the revision flag added.

Code.any_isalnum

Returns True if any characters are alphanumeric.

Code.children

Children of the tree.

Code.content

Text content.

Code.id

ID of the element.

Code.next_elem

Next element.

Code.prev_elem

Previous element.

Code.raw

Raw string of the element.

Code.tag

Element tag.

Code.tail

Tail of the element as a string.

Code.text_content

Text content.

Code.title

Element title.

Code.tostring

Attributes of the element as a dictionary.