Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Safe Haskell | None |
Useful traversals inspired by XPath
- (./) :: Plated a => Traversal s t a a -> Traversal a a u v -> Traversal s t u v
- name :: Lens' Element Name
- el :: Name -> Traversal' Element Element
- attributeIs :: Name -> Text -> Traversal' Element Element
- attributeSatisfies :: Name -> (Text -> Bool) -> Traversal' Element Element
- attr :: Name -> IndexedTraversal' Name Element Text
- attribute :: Name -> IndexedLens' Name Element (Maybe Text)
- attrs :: Lens' Element (Map Name Text)
- text :: Traversal' Element Text
- comment :: Traversal' Element Text
- entire :: Traversal' Element Element
- nodes :: Lens' Element [Node]
- _Element :: Prism' Node Element
- _Content :: Prism' Node Text
- class AsInstruction t where
- class AsComment t where
- root :: Lens' Document Element
- prologue :: Lens' Document Prologue
- epilogue :: Lens' Document [Miscellaneous]
- doctype :: Lens' Prologue (Maybe Doctype)
- _nameLocalName :: Lens' Name Text
- _nameNamespace :: Lens' Name (Maybe Text)
- _namePrefix :: Lens' Name (Maybe Text)
- _instructionTarget :: Lens' Instruction Text
- _instructionData :: Lens' Instruction Text
Lenses, traversals for Element
Names
Attributes
attributeIs :: Name -> Text -> Traversal' Element ElementSource
attributeSatisfies :: Name -> (Text -> Bool) -> Traversal' Element ElementSource
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
class AsInstruction t whereSource