pyxmpp.xmlextra.StreamReader

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

# Class StreamReader

source code

A simple push-parser interface for XML streams.

Instance Methods | [hide private]
__init__(self, handler) Initialize StreamReader object. | source code
`libxml2.xmlNode` |
doc(self) Get the document being parsed. | source code
feed(self, s) Pass a string to the stream parser. | source code

Method Details | [hide private]

### __init__(self, handler) (Constructor) | source code
Initialize StreamReader object. Parameters: `handler` (StreamHandler derived class) - handler object for the stream content

### doc(self) | source code
Get the document being parsed. Returns: `libxml2.xmlNode` the document.

### feed(self, s) | source code
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.