class documentation

class SimpleTreeBuilder(Builder): (source)

Known subclasses: zim.templates.parser.TemplateTreeBuilder

View In Hierarchy

Builder class that builds a tree of SimpleTreeElements
Method __init__ Undocumented
Method append No summary
Method end No summary
Method get_root Undocumented
Method start No summary
Method text Append text @param text: text to be appended as string @implementation: must be implemented by sub-classes
Instance Variable elementfactory Undocumented
Instance Variable merge_text Undocumented
Instance Variable root Undocumented
Instance Variable stack Undocumented
def __init__(self, elementfactory=SimpleTreeElement): (source)

Undocumented

def append(self, tag, attrib=None, text=None): (source)
Convenience function to open a tag, append text and close it immediatly. Only used for formatted text that has no sub-processing done.
Parameters
tagthe tag name
attriboptional dict with attributes
textformatted text
Unknown Field: implementation
optional for subclasses, default implementation calls start(), text(), and end()
def end(self, tag): (source)
End formatted region
Parameters
tagthe tag name
Raises
XXXwhen tag does not match current state
Unknown Field: implementation
must be implemented by sub-classes
def get_root(self): (source)

Undocumented

def start(self, tag, attrib=None): (source)
Start formatted region
Parameters
tagthe tag name
attriboptional dict with attributes
Unknown Field: implementation
must be implemented by sub-classes
def text(self, text): (source)
Append text
Parameters
texttext to be appended as string
Unknown Field: implementation
must be implemented by sub-classes
elementfactory = (source)

Undocumented

merge_text: bool = (source)

Undocumented

Undocumented

stack = (source)

Undocumented