class documentation

A very simple DOM-like representation for parsed epytext documents. Each epytext document is encoded as a tree whose nodes are Element objects, and whose leaves are strings. Each node is marked by a tag and zero or more attributes, attribs. Each attribute is a mapping from a string key to a string value.

Method __init__ Undocumented
Method __repr__ Undocumented
Method __str__ Return a string representation of this element, using XML notation.
Instance Variable attribs A dictionary mapping attribute names to attribute values for this element.
Instance Variable children A list of the children of this element.
Instance Variable tag A string tag indicating the type of this element.
def __init__(self, tag: str, *children: str | Element, **attribs: Any): (source)

Undocumented

def __repr__(self) -> str: (source)

Undocumented

def __str__(self) -> str: (source)

Return a string representation of this element, using XML notation.

Note
Doesn't escape '<' or '&' or '>', so the result is only XML-like and cannot actually be parsed as XML.

A dictionary mapping attribute names to attribute values for this element.

children = (source)

A list of the children of this element.

A string tag indicating the type of this element.