Copyright | (c) 2013, Joseph Abrahamson |
---|---|
License | MIT |
Maintainer | me@jspha.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
A simple Hexpat lens module. This is nothing more than a type-specialized re-export of Text.XML.Expat.Lens.Generic.
Lenses provide power to do very concise XML tree diving. This module provides a less general interface to the Hexpat datatypes via lenses.
- name :: Traversal' (UNode t) t
- attributes :: Traversal' (UNode t) (UAttributes t)
- text :: Prism' (UNode t) t
- children :: Traversal' (UNode t) [UNode t]
- allNodes :: UNode t -> [UNode t]
- (./) :: Plated i => Traversal' s i -> Traversal' i a -> Traversal' s a
- named :: (Eq a, Applicative f, Choice p) => a -> Optic' p f (NodeG f1 a text) (NodeG f1 a text)
- parameterized :: (Eq (IxValue a), Applicative f, Choice p, Ixed a) => Index a -> IxValue a -> Optic' p f a a
Basic inspection
name :: Traversal' (UNode t) t Source
attributes :: Traversal' (UNode t) (UAttributes t) Source
Recursive inspection
children :: Traversal' (UNode t) [UNode t] Source
(./) :: Plated i => Traversal' s i -> Traversal' i a -> Traversal' s a Source
Filters
named :: (Eq a, Applicative f, Choice p) => a -> Optic' p f (NodeG f1 a text) (NodeG f1 a text) Source
parameterized :: (Eq (IxValue a), Applicative f, Choice p, Ixed a) => Index a -> IxValue a -> Optic' p f a a Source