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

Data.XML.Parser.Low.Name

Description

All documentation examples assume the following setup:

:set -XOverloadedStrings
import Data.Attoparsec.ByteString
Synopsis

Documentation

data QName Source #

Constructors

QName 

Fields

Instances

Instances details
Eq QName Source # 
Instance details

Defined in Data.XML.Parser.Low.Name

Methods

(==) :: QName -> QName -> Bool #

(/=) :: QName -> QName -> Bool #

Ord QName Source # 
Instance details

Defined in Data.XML.Parser.Low.Name

Methods

compare :: QName -> QName -> Ordering #

(<) :: QName -> QName -> Bool #

(<=) :: QName -> QName -> Bool #

(>) :: QName -> QName -> Bool #

(>=) :: QName -> QName -> Bool #

max :: QName -> QName -> QName #

min :: QName -> QName -> QName #

Read QName Source # 
Instance details

Defined in Data.XML.Parser.Low.Name

Show QName Source # 
Instance details

Defined in Data.XML.Parser.Low.Name

Methods

showsPrec :: Int -> QName -> ShowS #

show :: QName -> String #

showList :: [QName] -> ShowS #

IsString QName Source #

Build a qualified name in a concise way. Prefix is assumed to be empty.

>>> "foo" :: QName
QName {namePrefix = "", nameLocal = "foo"}
Instance details

Defined in Data.XML.Parser.Low.Name

Methods

fromString :: String -> QName #

tokenQualifiedName :: CharParsing m => Monad m => m QName Source #

https://www.w3.org/TR/xml-names/#NT-QName

>>> parseOnly tokenQualifiedName "price"
Right (QName {namePrefix = "", nameLocal = "price"})
>>> parseOnly tokenQualifiedName "edi:price"
Right (QName {namePrefix = "edi", nameLocal = "price"})

tokenNCName :: CharParsing m => Monad m => m Text Source #

https://www.w3.org/TR/xml-names/#NT-NCName

>>> parseOnly tokenNCName "price"
Right "price"
>>> parse tokenNCName "edi:price"
Done ":price" "edi"

tokenName :: CharParsing m => Monad m => m Text Source #

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

>>> parseOnly tokenName "price"
Right "price"
>>> parseOnly tokenName "edi:price"
Right "edi:price"