xml-1.3.13: A simple XML library.

Safe HaskellSafe-Inferred

Text.XML.Light.Lexer

Synopsis

Documentation

class XmlSource s where

Methods

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

Instances

XmlSource String 
XmlSource ByteString 
XmlSource ByteString 
XmlSource Text 
XmlSource Text 
XmlSource (Scanner s) 

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

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

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

Constructors

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

Instances

Show Token 

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

tag :: LString -> [Token]

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

attr_val :: LString -> (String, LString)

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

decode_attr :: String -> String

data Txt

Constructors

TxtBit String 
CRefBit String 

Instances

Show Txt 

decode_text :: [Char] -> [Txt]

cref_to_char :: [Char] -> Maybe Char

num_esc :: String -> Maybe Char

cvt_char :: Int -> Maybe Char