xml-extractors-0.4.0.3: Extension to the xml package to extract data from parsed xml
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.XML.Light.Extractors.Internal

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

Instances details
Show Err Source # 
Instance details

Defined in Text.XML.Light.Extractors.Internal

Methods

showsPrec :: Int -> Err -> ShowS #

show :: Err -> String #

showList :: [Err] -> ShowS #

data ExtractionErr Source #

Error with a context.

Constructors

ExtractionErr 

Fields

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