tagsoup-selection-0.1.0.1: Selecting subtrees from TagSoup's TagTrees using CSS selectors

Safe HaskellNone
LanguageHaskell98

Text.HTML.TagSoup.Tree.Zipper

Description

A zipper for TagSoup TagTrees.

Synopsis

Documentation

data TagTreePos str Source #

Constructors

TagTreePos 

Fields

Instances

Show str => Show (TagTreePos str) Source # 

Methods

showsPrec :: Int -> TagTreePos str -> ShowS #

show :: TagTreePos str -> String #

showList :: [TagTreePos str] -> ShowS #

iteratePos :: (TagTreePos str -> Maybe (TagTreePos str)) -> TagTreePos str -> [TagTreePos str] Source #

iteratePos iter pos applies iter to pos until Nothing is returned, collecting all new positions in the result list.

traverseTree :: Monoid m => (TagTreePos str -> m) -> TagTreePos str -> m Source #

traverseTree f pos performs a depth-first traversal of a tree. The starting position is pos, and the result is obtained from the values produced by applying f to each visited node. Note that this function will also traverse parent nodes if the position isn't indicating the root of the tree.

traverseTreeBF :: Monoid m => (TagTreePos str -> m) -> TagTreePos str -> m Source #

Like traverseTree, but performs a breadth-first traversal.