hxt-xpath- The XPath modules for HXT.

Safe HaskellNone



Navigable tree structure which allow a program to traverse for XPath expressions copied and modified from HXML (http://www.flightlab.com/~joe/hxml/)



data NavTree a Source

navigable tree with nodes of type node

a navigable tree consists of a n-ary tree for the current fragment tree, a navigable tree for all ancestors, and two n-ary trees for the previous- and following siblings




Show a => Show (NavTree a) 

ntree :: NTree a -> NavTree aSource

converts a n-ary tree in a navigable tree

subtreeNT :: NavTree a -> NTree aSource

converts a navigable tree in a n-ary tree

dataNT :: NavTree a -> aSource

function for selecting the value of the current fragment tree

childrenNT :: NavTree a -> [NTree a]Source

function for selecting all children of a tree

indexNT :: NavTree a -> IntSource

position of tree in parent

pathNT :: NavTree a -> [Int]Source

path (index list) of a navigatable tree

o' :: (b -> [c]) -> (a -> [b]) -> a -> [c]Source

Kleisli composition:

maybeStar :: (a -> Maybe a) -> a -> [a]Source

maybePlus :: (a -> Maybe a) -> a -> [a]Source