Portability | portable |
---|---|
Stability | experimental |
Maintainer | Uwe Schmidt (uwe@fh-wedel.de) |
Text.XML.HXT.Expat
Description
Interface for Expat XML Parser
- withExpat :: Bool -> SysConfig
- withoutExpat :: SysConfig
- issueExpatErr :: IOStateArrow s b b
Documentation
withExpat :: Bool -> SysConfigSource
The system config option to enable the expat parser
Here is an example, how to use it:
... import Text.HXT.XML.Core import Text.HXT.XML.Expat ... readDocument [ withExpat True ] "some-file.xml" ...
reads the given document and parses it with the expat parser.
There is no validation enabled. The parameter to withExpat
determines, whether parsing
is done strict. Here strict parsing is enabled. When strict parsing is used,
the parse is immediately checked for parser errors, and possible errors are issued.
When set to non-strict parsing, error checking is delayed and may be done later
with the issueExpatErr
arrow.
When HTML parsing is enabled, the expat parser will be configured with the HTML enitity reference resolver, else only the predefined XML enitities will be substituted.
withoutExpat :: SysConfigSource
Turns off expat parsing. The build in HXT parsers will be used.
issueExpatErr :: IOStateArrow s b bSource
In case of lazy parsing check for possible errors