Safe Haskell | None |
---|---|
Language | Haskell2010 |
All documentation examples assume the following setup:
:set -XOverloadedStrings import Data.Attoparsec.ByteString
Synopsis
- data QName = QName {
- namePrefix :: Text
- nameLocal :: Text
- tokenQualifiedName :: CharParsing m => Monad m => m QName
- tokenNCName :: CharParsing m => Monad m => m Text
- tokenName :: CharParsing m => Monad m => m Text
Documentation
A qualified name.
QName | |
|
Instances
Eq QName Source # | |
Ord QName Source # | |
Read QName Source # | |
Show QName Source # | |
IsString QName Source # | Build a qualified name in a concise way. Prefix is assumed to be empty.
|
Defined in Data.XML.Parser.Low.Name 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"