Package pyxmpp :: Module xmlextra :: Class StreamReader
[show private | hide private]
[frames | no frames]

Class StreamReader


A simple push-parser interface for XML streams.
Method Summary
  __init__(self, handler)
Initialize StreamReader object.
libxml2.xmlNode doc(self)
Get the document being parsed.
  feed(self, s)
Pass a string to the stream parser.

Method Details

__init__(self, handler)
(Constructor)

Initialize StreamReader object.
Parameters:
handler - handler object for the stream content
           (type=StreamHandler derived class)

doc(self)

Get the document being parsed.
Returns:
the document.
           (type=libxml2.xmlNode)

feed(self, s)

Pass a string to the stream parser.

Parameters:
  • s: string to parse.
Types:
  • s: str
Returns:
None on EOF, False when whole input was parsed and True if there is something still left in the buffer.