class documentation
class Element: (source)
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. |
Return a string representation of this element, using XML notation.
Returns | |
str | Undocumented |
Note | |
Doesn't escape '<' or '&' or '>', so the result is only XML-like and cannot actually be parsed as XML. |