hxt-expat-9.1.1: Expat parser for HXT

CopyrightCopyright (C) 2010 Uwe Schmidt
LicenseMIT
MaintainerUwe Schmidt (uwe@fh-wedel.de)
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Text.XML.HXT.Expat

Description

Interface for Expat XML Parser

Synopsis

Documentation

withExpat :: Bool -> SysConfig #

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 :: SysConfig #

Turns off expat parsing. The build in HXT parsers will be used.

issueExpatErr :: IOStateArrow s b b #

In case of lazy parsing check for possible errors