xml-extractors-0.4.0.2: Extension to the xml package to extract data from parsed xml

Safe HaskellSafe
LanguageHaskell2010

Text.XML.Light.Extractors.Internal

Contents

Synopsis

Documentation

type Path = [String] Source #

Location for some content.

For now it is a reversed list of content indices (starting at 1) and element names. This may change to something less "stringly typed".

data Err Source #

Extraction errors.

Constructors

ErrExpectContent

Some expected content is missing

ErrExpectAttrib

An expected attribute is missing

Fields

ErrAttribValue

An attribute value was bad

Fields

ErrEnd

Expected end of contents

ErrNull

Unexpected end of contents

ErrMsg String 

Instances

Show Err Source # 

Methods

showsPrec :: Int -> Err -> ShowS #

show :: Err -> String #

showList :: [Err] -> ShowS #

Element extraction

attribAs Source #

Arguments

:: String

name of attribute to extract

-> (String -> Either String a)

function returning given string to some value or an error message

-> ElementExtractor a 

Contents extraction