Safe Haskell | None |
---|---|
Language | Haskell2010 |
XMLQuery
- type Text = Alt Text
- text :: (Text -> Either Text a) -> Text a
- textValue :: Text Text
- type Element = Alt Element
- elementNameText :: Text a -> Element a
- elementAttr :: Attr a -> Element a
- elementNodes :: Nodes a -> Element a
- elementNameIs :: Text -> Element ()
- type Attr = Alt Attr
- attrNameText :: Text a -> Attr a
- attrValueText :: Text a -> Attr a
- attrNameIs :: Text -> Attr ()
- attrValueIs :: Text -> Attr ()
- type Nodes = Alt Nodes
- nodesImmediateNode :: Node a -> Nodes a
- nodesEventualNode :: Node a -> Nodes a
- type Node = Alt Node
- nodeElement :: Element a -> Node a
- nodeText :: Text a -> Node a
Text
text :: (Text -> Either Text a) -> Text a Source
Lifts an arbitrary textual parser function to the text-value parser.
Provides a doorway for composition with such libraries as "parsec" or "attoparsec".
Derivatives
Element
elementNameText :: Text a -> Element a Source
elementAttr :: Attr a -> Element a Source
Parses one of element's attributes without any regard to order.
elementNodes :: Nodes a -> Element a Source
Parses all of element's nodes.
Can be used multiple times, thus allowing for parallel parsing of element's child-nodes. Naturally this will result in traversing the element's nodes multiple times.
Derivatives
elementNameIs :: Text -> Element () Source
Attr
attrNameText :: Text a -> Attr a Source
Parses the attribute's name using the provided textual parser.
attrValueText :: Text a -> Attr a Source
Parses the attribute's value using the provided textual parser.
Derivatives
attrNameIs :: Text -> Attr () Source
A parser, which succeeds if the attribute's name matches the provided value.
attrValueIs :: Text -> Attr () Source
A parser, which succeeds if the attribute's value matches the provided value.
Nodes
nodesImmediateNode :: Node a -> Nodes a Source
Parses the next node.
nodesEventualNode :: Node a -> Nodes a Source
Parses one of the following nodes.
Node
nodeElement :: Element a -> Node a Source