hxt-9.3.1.21: A collection of tools for processing XML with Haskell.
CopyrightCopyright (C) 2010 Uwe Schmidt
LicenseMIT
MaintainerUwe Schmidt (uwe\@fh-wedel.de)
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Tree.NavigatableTree.XPathAxis

Description

Navigatable trees need to have operations to move up, down, left and right. With these elementary operations, the XPath axises can be defined.

Synopsis

Documentation

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

collect all trees by moving into one direction, starting tree is included

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

collect all trees by moving into one direction, starting tree is not included

parentAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: parent

ancestorAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: ancestor

ancestorOrSelfAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: ancestor or self

childAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: child

descendantAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: descendant

descendantOrSelfAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: descendant or self

revDescendantOrSelfAxis :: NavigatableTree t => t a -> [t a] Source #

not an official XPath axis but useful: reverse descendant or self, used in preceding axis

followingSiblingAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: following sibling

precedingSiblingAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: preceeding sibling

selfAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: self

followingAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: following

precedingAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: preceding

mvToRoot :: NavigatableTree t => t a -> t a Source #

move to the root