class documentation

class twisted.web.sux.XMLParser(Protocol): (source)

Known subclasses: twisted.web.microdom.MicroDOMParser, twisted.words.xish.domish.SuxElementStream

View In Hierarchy

Undocumented

Instance Variable state Undocumented
Instance Variable encodings Undocumented
Class Variable filename Undocumented
Class Variable beExtremelyLenient Undocumented
Method connectionMade Called when a connection is made.
Instance Variable lineno Undocumented
Instance Variable colno Undocumented
Method saveMark Get the line number and column of the last character parsed
Method maybeBodyData Undocumented
Method dataReceived Called whenever data is received.
Method connectionLost End the last state we were in.
Method do_begin Undocumented
Method begin_comment Undocumented
Instance Variable commentbuf Undocumented
Method do_comment Undocumented
Method begin_tagstart Undocumented
Instance Variable tagName Undocumented
Instance Variable tagAttributes Undocumented
Instance Variable termtag Undocumented
Instance Variable endtag Undocumented
Method do_tagstart Undocumented
Instance Variable bodydata Undocumented
Method begin_unentity Undocumented
Method do_unentity Undocumented
Method end_unentity Undocumented
Method begin_expectcdata Undocumented
Instance Variable cdatabuf Undocumented
Method do_expectcdata Undocumented
Method do_cdata Undocumented
Method end_cdata Undocumented
Method do_attrs Undocumented
Method begin_doctype Undocumented
Instance Variable doctype Undocumented
Method do_doctype Undocumented
Method end_doctype Undocumented
Method do_waitforgt Undocumented
Method begin_attrname Undocumented
Instance Variable attrname Undocumented
Method do_attrname Undocumented
Instance Variable attrval Undocumented
Method do_beforeattrval Undocumented
Method begin_beforeeq Undocumented
Method do_beforeeq Undocumented
Method begin_attrval Undocumented
Instance Variable quotetype Undocumented
Method do_attrval Undocumented
Method end_attrval Undocumented
Method begin_messyattr Undocumented
Method do_messyattr Undocumented
Method end_messyattr Undocumented
Method begin_afterslash Undocumented
Method do_afterslash Undocumented
Method begin_bodydata Undocumented
Method do_bodydata Undocumented
Method end_bodydata Undocumented
Method do_waitforendscript Undocumented
Method begin_waitscriptendtag Undocumented
Instance Variable temptagdata Undocumented
Method do_waitscriptendtag Undocumented
Method begin_entityref Undocumented
Instance Variable erefbuf Undocumented
Instance Variable erefextra Undocumented
Method do_entityref Undocumented
Method end_entityref Undocumented
Method begin_spacebodydata Undocumented
Method gotTagStart Encountered an opening tag.
Method gotText Encountered text
Method gotEntityReference Encountered mnemonic entity reference
Method gotComment Encountered comment.
Method gotCData Encountered CDATA
Method gotDoctype Encountered DOCTYPE
Method gotTagEnd Encountered closing tag
Instance Variable _prepend Undocumented
Instance Variable _leadingBodyData Undocumented
Method _parseError Undocumented
Method _buildStateTable Return a dictionary of begin, do, end state function tuples
Method _decode Undocumented
Instance Variable _attrname_termtag Undocumented
Instance Variable _beforeeq_termtag Undocumented
Instance Variable _after_slash_closed Undocumented

Inherited from Protocol:

Class Variable factory Undocumented
Method logPrefix Return a prefix matching the class name, to identify log messages related to this protocol instance.

Inherited from BaseProtocol (via Protocol):

Instance Variable connected Undocumented
Instance Variable transport Undocumented
Method makeConnection Make a connection to a transport and a server.
state = (source)

Undocumented

encodings = (source)

Undocumented

(type: list)
filename = (source)

Undocumented

(type: str)
beExtremelyLenient = (source)

Undocumented

(type: int)
_prepend = (source)

Undocumented

_leadingBodyData = (source)

Undocumented

def connectionMade(self): (source)

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.

lineno = (source)

Undocumented

colno = (source)

Undocumented

def saveMark(self): (source)

Get the line number and column of the last character parsed

def _parseError(self, message): (source)

Undocumented

def _buildStateTable(self): (source)

Return a dictionary of begin, do, end state function tuples

def _decode(self, data): (source)

Undocumented

def maybeBodyData(self): (source)

Undocumented

def dataReceived(self, data): (source)

Called whenever data is received.

Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.

Parametersdataa string of indeterminate length. Please keep in mind that you will probably need to buffer some data, as partial (or multiple) protocol messages may be received! I recommend that unit tests for protocols call through to this method with differing chunk sizes, down to one byte at a time.
def connectionLost(self, reason): (source)
def do_begin(self, byte): (source)

Undocumented

def begin_comment(self, byte): (source)

Undocumented

commentbuf = (source)

Undocumented

(type: str)
def do_comment(self, byte): (source)

Undocumented

def begin_tagstart(self, byte): (source)

Undocumented

tagName = (source)

Undocumented

(type: str)
tagAttributes = (source)

Undocumented

(type: dict)
termtag = (source)

Undocumented

(type: int)
endtag = (source)

Undocumented

(type: bool)
def do_tagstart(self, byte): (source)

Undocumented

bodydata = (source)

Undocumented

def begin_unentity(self, byte): (source)

Undocumented

def do_unentity(self, byte): (source)

Undocumented

def end_unentity(self): (source)

Undocumented

def begin_expectcdata(self, byte): (source)

Undocumented

cdatabuf = (source)

Undocumented

(type: str)
def do_expectcdata(self, byte): (source)

Undocumented

def do_cdata(self, byte): (source)

Undocumented

def end_cdata(self): (source)

Undocumented

def do_attrs(self, byte): (source)

Undocumented

def begin_doctype(self, byte): (source)

Undocumented

doctype = (source)

Undocumented

def do_doctype(self, byte): (source)

Undocumented

def end_doctype(self): (source)

Undocumented

def do_waitforgt(self, byte): (source)

Undocumented

def begin_attrname(self, byte): (source)

Undocumented

attrname = (source)

Undocumented

(type: str)
_attrname_termtag = (source)

Undocumented

(type: int)
def do_attrname(self, byte): (source)

Undocumented

attrval = (source)

Undocumented

def do_beforeattrval(self, byte): (source)

Undocumented

def begin_beforeeq(self, byte): (source)

Undocumented

_beforeeq_termtag = (source)

Undocumented

(type: int)
def do_beforeeq(self, byte): (source)

Undocumented

def begin_attrval(self, byte): (source)

Undocumented

quotetype = (source)

Undocumented

def do_attrval(self, byte): (source)

Undocumented

def end_attrval(self): (source)

Undocumented

def begin_messyattr(self, byte): (source)

Undocumented

def do_messyattr(self, byte): (source)

Undocumented

def end_messyattr(self): (source)

Undocumented

def begin_afterslash(self, byte): (source)

Undocumented

_after_slash_closed = (source)

Undocumented

(type: int)
def do_afterslash(self, byte): (source)

Undocumented

def begin_bodydata(self, byte): (source)

Undocumented

def do_bodydata(self, byte): (source)

Undocumented

def end_bodydata(self): (source)

Undocumented

def do_waitforendscript(self, byte): (source)

Undocumented

def begin_waitscriptendtag(self, byte): (source)

Undocumented

temptagdata = (source)

Undocumented

(type: str)
def do_waitscriptendtag(self, byte): (source)

Undocumented

def begin_entityref(self, byte): (source)

Undocumented

erefbuf = (source)

Undocumented

(type: str)
erefextra = (source)

Undocumented

def do_entityref(self, byte): (source)

Undocumented

def end_entityref(self): (source)

Undocumented

def begin_spacebodydata(self, byte): (source)

Undocumented

def gotTagStart(self, name, attributes): (source)

Encountered an opening tag.

Default behaviour is to print.

def gotText(self, data): (source)

Encountered text

Default behaviour is to print.

def gotEntityReference(self, entityRef): (source)

Encountered mnemonic entity reference

Default behaviour is to print.

def gotComment(self, comment): (source)

Encountered comment.

Default behaviour is to ignore.

def gotCData(self, cdata): (source)

Encountered CDATA

Default behaviour is to call the gotText method

def gotDoctype(self, doctype): (source)

Encountered DOCTYPE

This is really grotty: it basically just gives you everything between '<!DOCTYPE' and '>' as an argument.

def gotTagEnd(self, name): (source)

Encountered closing tag

Default behaviour is to print.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.