hxt-xpath-9.1.2.2: The XPath modules for HXT.

Safe Haskell | None
Language | Haskell98

Text.XML.HXT.XPath.NavTree

Description

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

Synopsis

- maybeStar :: (a -> Maybe a) -> a -> [a]
- maybePlus :: (a -> Maybe a) -> a -> [a]
- parentAxis :: NavTree a -> [NavTree a]
- ancestorAxis :: NavTree a -> [NavTree a]
- ancestorOrSelfAxis :: NavTree a -> [NavTree a]
- childAxis :: NavTree a -> [NavTree a]
- descendantAxis :: NavTree a -> [NavTree a]
- descendantOrSelfAxis :: NavTree a -> [NavTree a]
- followingSiblingAxis :: NavTree a -> [NavTree a]
- precedingSiblingAxis :: NavTree a -> [NavTree a]
- selfAxis :: NavTree a -> [NavTree a]
- followingAxis :: NavTree a -> [NavTree a]
- precedingAxis :: NavTree a -> [NavTree a]
- ntree :: NTree a -> NavTree a
- data NavTree a = NT {
  - self :: NTree a
  - selfIndex :: Int
  - ancestors :: [NavTree a]
  - previousSiblings :: [NTree a]
  - followingSiblings :: [NTree a]
  }
- subtreeNT :: NavTree a -> NTree a
- dataNT :: NavTree a -> a
- childrenNT :: NavTree a -> [NTree a]
- indexNT :: NavTree a -> Int
- pathNT :: NavTree a -> [Int]
- upNT :: NavTree a -> Maybe (NavTree a)
- downNT :: NavTree a -> Maybe (NavTree a)
- leftNT :: NavTree a -> Maybe (NavTree a)
- rightNT :: NavTree a -> Maybe (NavTree a)
- preorderNT :: NavTree a -> [NavTree a]
- revPreorderNT :: NavTree a -> [NavTree a]
- getChildrenNT :: NavTree a -> [NavTree a]
- o' :: (b -> [c]) -> (a -> [b]) -> a -> [c]
- attributeAxis :: NavTree XNode -> [NavTree XNode]
- module Data.Tree.NTree.TypeDefs

# Documentation

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

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

parentAxis :: NavTree a -> [NavTree a] Source #

ancestorAxis :: NavTree a -> [NavTree a] Source #

ancestorOrSelfAxis :: NavTree a -> [NavTree a] Source #

childAxis :: NavTree a -> [NavTree a] Source #

descendantAxis :: NavTree a -> [NavTree a] Source #

descendantOrSelfAxis :: NavTree a -> [NavTree a] Source #

followingSiblingAxis :: NavTree a -> [NavTree a] Source #

precedingSiblingAxis :: NavTree a -> [NavTree a] Source #

selfAxis :: NavTree a -> [NavTree a] Source #

followingAxis :: NavTree a -> [NavTree a] Source #

precedingAxis :: NavTree a -> [NavTree a] Source #

ntree :: NTree a -> NavTree a Source #

converts a n-ary tree in a navigable tree

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

Constructors

NT |

Fields

- self :: NTree a
- selfIndex :: Int
- ancestors :: [NavTree a]
- previousSiblings :: [NTree a]
- followingSiblings :: [NTree a]

#### Instances

Instances details

Show a => Show (NavTree a) Source # |
Instance details Defined in Text.XML.HXT.XPath.NavTree Methods showsPrec :: Int -> NavTree a -> ShowS Source # show :: NavTree a -> String Source # showList :: [NavTree a] -> ShowS Source #

subtreeNT :: NavTree a -> NTree a Source #

converts a navigable tree in a n-ary tree

dataNT :: NavTree a -> a Source #

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 -> Int Source #

position of tree in parent

pathNT :: NavTree a -> [Int] Source #

path (index list) of a navigatable tree

upNT :: NavTree a -> Maybe (NavTree a) Source #

downNT :: NavTree a -> Maybe (NavTree a) Source #

leftNT :: NavTree a -> Maybe (NavTree a) Source #

rightNT :: NavTree a -> Maybe (NavTree a) Source #

preorderNT :: NavTree a -> [NavTree a] Source #

revPreorderNT :: NavTree a -> [NavTree a] Source #

getChildrenNT :: NavTree a -> [NavTree a] Source #

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

Kleisli composition:

attributeAxis :: NavTree XNode -> [NavTree XNode] Source #

module Data.Tree.NTree.TypeDefs