hxt-9.3.1.1: A collection of tools for processing XML with Haskell.

Portability | portable
Stability | stable
Maintainer | Uwe Schmidt (uwe@fh-wedel.de)
Safe Haskell | Safe-Inferred

Text.XML.HXT.Parser.XmlCharParser

Description

UTF-8 character parser and simple XML token parsers

Synopsis

- type XParser s a = GenParser Char (XPState s) a
- type SimpleXParser a = XParser () a
- data XPState s = XPState {
  - xps_normalizeNewline :: !Bool
  - xps_userState :: s
  }
- withNormNewline :: a -> XPState a
- withoutNormNewline :: a -> XPState a
- xmlChar :: XParser s Unicode
- xmlNameChar :: XParser s Unicode
- xmlNameStartChar :: XParser s Unicode
- xmlNCNameChar :: XParser s Unicode
- xmlNCNameStartChar :: XParser s Unicode
- xmlLetter :: XParser s Unicode
- xmlSpaceChar :: XParser s Char
- xmlCRLFChar :: XParser s Char

# Documentation

type XParser s a = GenParser Char (XPState s) aSource

type SimpleXParser a = XParser () aSource

data XPState s Source

Constructors

XPState |

Fields

xps_normalizeNewline :: !Bool
xps_userState :: s

withNormNewline :: a -> XPState aSource

withoutNormNewline :: a -> XPState aSource

xmlChar :: XParser s Unicode Source

parse a single Unicode character

xmlNameChar :: XParser s Unicode Source

parse a XML name character

xmlNameStartChar :: XParser s Unicode Source

parse a XML name start character

xmlNCNameChar :: XParser s Unicode Source

parse a XML NCName character

xmlNCNameStartChar :: XParser s Unicode Source

parse a XML NCName start character

xmlLetter :: XParser s Unicode Source

parse a XML letter character

xmlSpaceChar :: XParser s Char Source

White Space (2.3)

end of line handling (2.11) will be done before or with `xmlCRLFChar` parser

xmlCRLFChar :: XParser s Char Source

White Space Normalization

end of line handling (2.11) #x0D and #x0D#x0A are mapped to #x0A