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

Data.XML.Parser.Mid.ExternalID

Description

Mid-level parsers for XML external entities.

https://www.w3.org/TR/REC-xml/#dt-extent

All documentation examples assume the following setup:

:set -XOverloadedStrings
import Data.Attoparsec.ByteString
Synopsis

Documentation

externalID :: CharParsing m => Monad m => m ExternalID Source #

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

>>> parseOnly externalID "PUBLIC '-//Textuality//TEXT Standard open-hatch boilerplate//EN' 'http://www.textuality.com/boilerplate/OpenHatch.xml'"
Right (PublicID "-//Textuality//TEXT Standard open-hatch boilerplate//EN" "http://www.textuality.com/boilerplate/OpenHatch.xml")
>>> parseOnly externalID "SYSTEM '../grafix/OpenHatch.gif'"
Right (SystemID "../grafix/OpenHatch.gif")