Safe Haskell | None |
---|---|
Language | Haskell2010 |
Mid-level parsers for XML instructions.
All documentation examples assume the following setup:
:set -XOverloadedStrings import Data.Attoparsec.ByteString
Synopsis
- data Instruction = Instruction Text Text
- instruction :: CharParsing m => Monad m => m Instruction
Documentation
>>>
:set -XOverloadedStrings
>>>
import Data.Attoparsec.ByteString
data Instruction Source #
Processing instruction.
Instances
Eq Instruction Source # | |
Defined in Data.XML.Parser.Mid.Instruction (==) :: Instruction -> Instruction -> Bool # (/=) :: Instruction -> Instruction -> Bool # | |
Ord Instruction Source # | |
Defined in Data.XML.Parser.Mid.Instruction compare :: Instruction -> Instruction -> Ordering # (<) :: Instruction -> Instruction -> Bool # (<=) :: Instruction -> Instruction -> Bool # (>) :: Instruction -> Instruction -> Bool # (>=) :: Instruction -> Instruction -> Bool # max :: Instruction -> Instruction -> Instruction # min :: Instruction -> Instruction -> Instruction # | |
Read Instruction Source # | |
Defined in Data.XML.Parser.Mid.Instruction readsPrec :: Int -> ReadS Instruction # readList :: ReadS [Instruction] # readPrec :: ReadPrec Instruction # readListPrec :: ReadPrec [Instruction] # | |
Show Instruction Source # | |
Defined in Data.XML.Parser.Mid.Instruction showsPrec :: Int -> Instruction -> ShowS # show :: Instruction -> String # showList :: [Instruction] -> ShowS # |
instruction :: CharParsing m => Monad m => m Instruction Source #
https://www.w3.org/TR/REC-xml/#dt-pi
>>>
parseOnly instruction "<?xml-stylesheet type='text/xsl' href='style.xsl'?>"
Right (Instruction "xml-stylesheet" "type='text/xsl' href='style.xsl'")