hextream-0.3.0.0: Streaming-friendly XML parsers
Safe HaskellNone
LanguageHaskell2010

Data.XML.InternalSubset.Parser.Low

Description

Low-level parsers for doctype's internal subset:

  • parsed tokens are small and may overlap; it is not possible to tokenize doctype internal-subset in a stateless way
  • parsers are reversible: all formatting details are retained (e.g. whitespacing)

All documentation examples assume the following setup:

:set -XOverloadedStrings
import Data.Attoparsec.ByteString
Synopsis

Documentation

tokenEntityOpen :: CharParsing m => m () Source #

<!ENTITY

tokenNotationOpen :: CharParsing m => m () Source #

<!NOTATION

tokenPublic :: CharParsing m => m () Source #

PUBLIC

tokenParameterEntityRef :: CharParsing m => Monad m => m ParameterEntityRef Source #

https://www.w3.org/TR/REC-xml/#NT-PEReference

>>> parseOnly tokenParameterEntityRef "%foo;"
Right (ParameterEntityRef "foo")