Safe Haskell | None |
---|---|
Language | Haskell2010 |
All documentation examples assume the following setup:
:set -XOverloadedStrings import Data.Attoparsec.ByteString import Data.XML.Parser.High
Synopsis
- newtype NameParser a = NameParser {
- runNameParser :: QName -> Maybe a
- anyName :: NameParser QName
- anyNameExcept :: QName -> NameParser QName
Documentation
newtype NameParser a Source #
How to parse tag names.
NameParser | |
|
Instances
anyName :: NameParser QName Source #
Match any qualified name.
anyNameExcept :: QName -> NameParser QName Source #
Match any qualified name, except for the given value.
>>>
parseOnly (runTokenParser $ tag' (anyNameExcept "foo") anyAttr anyContent) "<foo></foo>"
Left ...>>>
parseOnly (runTokenParser $ tag' (anyNameExcept "foo") anyAttr anyContent) "<bar></bar>"
Right ()