xml-1.3.14: A simple XML library.
Safe HaskellSafe-Inferred
LanguageHaskell98

Text.XML.Light.Lexer

Synopsis

Documentation

class XmlSource s where Source #

Methods

uncons :: s -> Maybe (Char, s) Source #

Instances

Instances details
XmlSource ByteString Source # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

uncons :: ByteString -> Maybe (Char, ByteString) Source #

XmlSource ByteString Source # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

uncons :: ByteString -> Maybe (Char, ByteString) Source #

XmlSource Text Source # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

uncons :: Text -> Maybe (Char, Text) Source #

XmlSource Text Source # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

uncons :: Text -> Maybe (Char, Text) Source #

XmlSource String Source # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

uncons :: String -> Maybe (Char, String) Source #

XmlSource (Scanner s) Source # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

uncons :: Scanner s -> Maybe (Char, Scanner s) Source #

linenumber :: XmlSource s => Integer -> s -> LString Source #

data Scanner s Source #

This type may be used to provide a custom scanning function for extracting characters.

Constructors

Scanner (Maybe (Char, s)) (s -> Maybe (Char, s)) 

Instances

Instances details
XmlSource (Scanner s) Source # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

uncons :: Scanner s -> Maybe (Char, Scanner s) Source #

customScanner :: (s -> Maybe (Char, s)) -> s -> Scanner s Source #

This type may be used to provide a custom scanning function for extracting characters.

type LChar = (Line, Char) Source #

data Token Source #

Constructors

TokStart Line QName [Attr] Bool 
TokEnd Line QName 
TokCRef String 
TokText CData 

Instances

Instances details
Show Token Source # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

showsPrec :: Int -> Token -> ShowS

show :: Token -> String

showList :: [Token] -> ShowS

tokens :: XmlSource source => source -> [Token] Source #

attribs :: LString -> ([Attr], Bool, [Token]) Source #

attr_val :: LString -> (String, LString) Source #

string :: LString -> (String, LString) Source #

Match the value for an attribute. For malformed XML we do our best to guess the programmer's intention.

break' :: (a -> Bool) -> [(b, a)] -> ([a], [(b, a)]) Source #

breakn :: (a -> Bool) -> [(b, a)] -> ([a], [(b, a)]) Source #

decode_attr :: String -> String Source #

data Txt Source #

Constructors

TxtBit String 
CRefBit String 

Instances

Instances details
Show Txt Source # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

showsPrec :: Int -> Txt -> ShowS

show :: Txt -> String

showList :: [Txt] -> ShowS

decode_text :: [Char] -> [Txt] Source #

cref_to_char :: [Char] -> Maybe Char Source #

num_esc :: String -> Maybe Char Source #

cvt_char :: Int -> Maybe Char Source #