|
|
|
|
|
| Description |
This module wraps the Expat API directly with IO operations
everywhere. Basic usage is:
- Make a new parser: newParser.
- Set up callbacks on the parser: setStartElementHandler, etc.
- Feed data into the parser: parse or parseChunk.
|
|
| Synopsis |
|
|
|
|
| Parser Setup
|
|
|
|
|
| Create a Parser. The encoding parameter, if provided, overrides the
document's encoding declaration.
|
|
| Parsing
|
|
|
| parse data feeds lazy bytestring data into a parser and returns
True if there was no parse error.
|
|
|
| Encoding types available for the document encoding.
| | Constructors | |
|
|
| Parser Callbacks
|
|
|
| The type of the "element started" callback. The first parameter is
the element name; the second are the (attribute, value) pairs.
|
|
|
| The type of the "element ended" callback. The parameter is
the element name.
|
|
|
| The type of the "character data" callback. The parameter is
the character data processed. This callback may be called more than once
while processing a single conceptual block of text.
|
|
|
| Attach a StartElementHandler to a Parser.
|
|
|
| Attach an EndElementHandler to a Parser.
|
|
|
| Attach an CharacterDataHandler to a Parser.
|
|
| Lower-level Parsing Interface
|
|
|
| parseChunk data False feeds strict ByteString data into a
Parser. The end of the data is indicated by passing True for the
final parameter. parse returns False on a parse error.
|
|
| Produced by Haddock version 2.1.0 |