@hackage xml-extractors0.4.0.0

Wrapper over xml to extract data from parsed xml

This is a library to simplify extraction of data from parsed xml.

See the Text.XML.Light.Extractors module for an example.

Motivation

The xml package provides functions to parse and get information from xml data. It will parse an xml string into a generic tree representation. Extracting information from such a tree while keeping track of location to handle errors is tricky. This library helps with that.

If there is an error during extraction (expected information is absent or wrong), it will return an error value with position information.

Some limitations

  • Only handles unqualified names. (This is by design to simplify usage.)

  • No column number and sometimes no line number reference in error values.