xml-extractors-0.3.0.0: Wrapper over xml to extract data from parsed xml

Safe HaskellSafe-Inferred
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 and element names. This may change to something less "stringly typed".

data Err Source

Extraction errors.

Constructors

ErrExpect

Some expected content is missing

Fields

expected :: String

expected content

found :: Content

found content

ErrAttr

An expected attribute is missing

Fields

expected :: String

expected content

atElement :: Element

element with missing attribute

ErrEnd

Expected end of contents

Fields

found :: Content

found content

ErrNull

Unexpected end of contents

Fields

expected :: String

expected content

ErrMsg String 

Instances

data ExtractionErr Source

Error with a context.

Constructors

ExtractionErr 

Fields

err :: Err
 
context :: Path
 

Element extraction

attribAs Source

Arguments

:: String

name of attribute to extract

-> (String -> Either Err a) 
-> ElementExtractor a 

Contents extraction