xml-1.3.14: A simple XML library.

Safe HaskellSafe
LanguageHaskell98

Text.XML.Light.Lexer

Synopsis

Documentation

class XmlSource s where #

Methods

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

Instances
XmlSource String # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

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

XmlSource ByteString # 
Instance details

Defined in Text.XML.Light.Lexer

XmlSource ByteString # 
Instance details

Defined in Text.XML.Light.Lexer

XmlSource Text # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

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

XmlSource Text # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

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

XmlSource (Scanner s) # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

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

data Scanner s #

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

Constructors

Scanner (Maybe (Char, s)) (s -> Maybe (Char, s)) 
Instances
XmlSource (Scanner s) # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

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

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

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

type LChar = (Line, Char) #

type LString = [LChar] #

data Token #

Instances
Show Token # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

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

tag :: LString -> [Token] #

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

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

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)]) #

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

data Txt #

Constructors

TxtBit String 
CRefBit String 
Instances
Show Txt # 
Instance details

Defined in Text.XML.Light.Lexer

Methods

showsPrec :: Int -> Txt -> ShowS #

show :: Txt -> String #

showList :: [Txt] -> ShowS #

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