class documentation
class _ToStan(handler.ContentHandler, handler.EntityResolver): (source)
Constructor: _ToStan(sourceFilename)
A SAX parser which converts an XML document to the Twisted STAN Document Object Model.
Method | __init__ |
No summary |
Method | characters |
Called when we receive some characters. CDATA characters get passed through as is. |
Method | comment |
Add an XML comment which we've encountered. |
Method | end |
We're no longer in a CDATA element. Collect up the characters we've parsed and put them in a new CDATA object. |
Method | end |
Document ended. |
Method | end |
DTDs are ignored. |
Method | end |
A namespace tag is closed. Pop the stack, if there's anything left in it, otherwise return to the document's namespace. |
Method | end |
"Pops the stack" on the prefix mapping. |
Method | processing |
Processing instructions are ignored. |
Method | set |
Set the document locator, which knows about line and character numbers. |
Method | start |
We're starting to be in a CDATA element, make a note of this. |
Method | start |
Initialise the document. |
Method | start |
DTDs are ignored. |
Method | start |
Gets called when we encounter a new xmlns attribute. |
Method | start |
Set up the prefix mapping, which maps fully qualified namespace URIs onto namespace prefixes. |
Instance Variable | current |
Undocumented |
Instance Variable | document |
Undocumented |
Instance Variable | in |
Undocumented |
Instance Variable | locator |
Undocumented |
Instance Variable | prefix |
Undocumented |
Instance Variable | source |
Undocumented |
Instance Variable | stack |
Undocumented |
Instance Variable | xmlns |
Undocumented |
We're no longer in a CDATA element. Collect up the characters we've parsed and put them in a new CDATA object.
A namespace tag is closed. Pop the stack, if there's anything left in it, otherwise return to the document's namespace.
def startElementNS(self, namespaceAndName:
Tuple[ str, str]
, qname: Optional[ str]
, attrs: AttributesNSImpl
):
(source)
¶
Gets called when we encounter a new xmlns attribute.
Parameters | |
namespaceTuple[ | a (namespace, name) tuple, where name determines which type of action to take, if the namespace matches TEMPLATE_NAMESPACE . |
qname:Optional[ | ignored. |
attrs:AttributesNSImpl | attributes on the element being started. |