| HaXml-1.19.7: Utilities for manipulating XML documents | Source code | Contents | Index

Text.XML.HaXml.Xtract.Parse

Description
A parser for the Xtract command-language. (The string input is tokenised internally by the lexer `lexXtract`.) See http://www.haskell.org/HaXml/Xtract.html for the grammar that is accepted.
Synopsis

parseXtract :: [Token] -> DFilter i
xtract :: (String -> String) -> String -> CFilter i

Documentation

parseXtract :: [Token] -> DFilter i | Source

The cool thing is that the Xtract command parser directly builds a higher-order `DFilter` (see Text.XML.HaXml.Xtract.Combinators) which can be applied to an XML document without further ado. (`parseXtract` halts the program if a parse error is found.)

xtract :: (String -> String) -> String -> CFilter i | Source

To convert an Xtract query into an ordinary HaXml combinator expression. First arg is a tag-transformation function (e.g. map toLower) applied
Produced by Haddock version 2.4.2