class documentation

class XMLString: (source)

Constructor: XMLString(s)

Implements interfaces: twisted.web.iweb.ITemplateLoader

View In Hierarchy

An ITemplateLoader that loads and parses XML from a string.

Method __init__ Run the parser on a io.StringIO copy of the string.
Method load Return the document.
Instance Variable _loadedTemplate The loaded document.
def __init__(self, s: str | bytes): (source)

Run the parser on a io.StringIO copy of the string.

Parameters
s:str, or a UTF-8 encoded bytes.The string from which to load the XML.
def load(self) -> list[Flattenable]: (source)

Return the document.

Returns
list[Flattenable]the loaded document.
_loadedTemplate: list[Flattenable] = (source)

The loaded document.