xml-lens-0.1.2: Lenses, traversals, prisms for xml-conduit

Portabilitynon-portable
Stabilityexperimental
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Safe HaskellNone

Text.XML.Lens

Contents

Description

Useful traversals inspired by XPath

Synopsis

Lenses, traversals for Element

(./) :: Plated a => Traversal s t a a -> Traversal a a u v -> Traversal s t u vSource

Combine two Traversals just like XPath's slash.

 
 l ./ m ≡ l . plate . m

Names

el :: Name -> Traversal' Element ElementSource

Traverse elements which has the specified name.

Attributes

Contents

text :: Traversal' Element TextSource

Traverse all contents of the element.

comment :: Traversal' Element TextSource

Traverse all comments of the element.

Children

entire :: Traversal' Element ElementSource

Traverse itself with its all children.

Prisms for Node

Lenses for Document

root :: Lens' Document ElementSource

The root element of the document.

Lenses for Name

Lenses for Instruction