Package pyxmpp :: Module xmlextra :: Class StreamHandler
[hide private]

Class StreamHandler

source code

Known Subclasses:

Base class for stream handler.
Instance Methods [hide private]
 
__init__(self) source code
 
_stanza(self, _doc, _node)
Process complete stanza.
source code
 
_stream_end(self, _doc)
Process stream end.
source code
 
_stream_start(self, _doc)
Process stream start.
source code
 
error(self, descr)
Called when an error is encountered in the stream.
source code
 
stanza(self, _unused, node)
Called when the end tag of a direct child of the root element is encountered in the stream.
source code
 
stream_end(self, doc)
Called when the end tag of root element is encountered in the stream.
source code
 
stream_start(self, doc)
Called when the start tag of root element is encountered in the stream.
source code
 
warning(self, desc)
Called when an warning is encountered in the stream.
source code
Method Details [hide private]

error(self, descr)

source code 
Called when an error is encountered in the stream.
Parameters:
  • descr (: str) - : description of the error

stanza(self, _unused, node)

source code 

Called when the end tag of a direct child of the root element is encountered in the stream.

Please note, that node will be removed from the document and freed after this method returns. If it is needed after that a copy must be made before the method returns.

Parameters:
  • _unused (: libxml2.xmlDoc) - : the document being parsed.
  • node (: libxml2.xmlNode) - : the (complete) element being processed

stream_end(self, doc)

source code 
Called when the end tag of root element is encountered in the stream.
Parameters:
  • doc (: libxml2.xmlDoc) - : the document being parsed.

stream_start(self, doc)

source code 
Called when the start tag of root element is encountered in the stream.
Parameters:
  • doc (: libxml2.xmlDoc) - : the document being parsed.

warning(self, desc)

source code 
Called when an warning is encountered in the stream.
Parameters:
  • descr (: str) - : description of the warning