Replaceable#

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

Provides the replaceable element.

Methods

Replaceable.find(_type[, terms])

Find the first type matching a given type string.

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

Find all types matching a given type string.

Replaceable.get(entry)

Get an item from an element.

Replaceable.has_children()

Return wether the element has children.

Replaceable.print_tree()

Print the tree.

Replaceable.rec_find(_type[, terms])

Find the first type matching a given type string recursively.

Replaceable.to_rst([prefix])

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

Replaceable.types_repr()

Return the string types.

Attributes

Replaceable.added

Has the revision flag added.

Replaceable.any_isalnum

Returns True if any characters are alphanumeric.

Replaceable.children

Children of the tree.

Replaceable.content

Text content.

Replaceable.content_equals

Content of the element after handling the '=' sign.

Replaceable.id

ID of the element.

Replaceable.is_equals

Replaceable equals something.

Replaceable.next_elem

Next element.

Replaceable.prev_elem

Previous element.

Replaceable.raw

Raw string of the element.

Replaceable.tag

Element tag.

Replaceable.tail

Tail of the element as a string.

Replaceable.text_content

Text content.

Replaceable.title

Element title.

Replaceable.tostring

Attributes of the element as a dictionary.