Safe Haskell | None |
---|---|
Language | Haskell2010 |
A basic query facility.
Synopsis
- data HTMLQuery a
- htmlQueryRun :: HTMLNode -> HTMLQuery a -> Maybe a
- htmlQueryExec :: HTMLQuery a -> HTMLNode -> Maybe a
- htmlQueryTry :: HTMLQuery HTMLNode -> HTMLNode -> HTMLNode
- htmlQueryStop :: HTMLQuery a
- htmlQueryCont :: HTMLQuery ()
- htmlQuerySucc :: a -> HTMLQuery a
- htmlQueryZipper :: HTMLQuery HTMLZipper
- htmlQueryNode :: HTMLQuery HTMLNode
- htmlQueryFirst :: HTMLQuery ()
- htmlQueryLast :: HTMLQuery ()
- htmlQueryNext :: HTMLQuery ()
- htmlQueryPrev :: HTMLQuery ()
- htmlQueryUp :: HTMLQuery ()
- htmlQueryTest :: Bool -> HTMLQuery ()
- htmlQueryName :: Text -> HTMLQuery ()
- htmlQueryIsFirst :: HTMLQuery ()
- htmlQueryIsLast :: HTMLQuery ()
- htmlQuerySave :: Int -> HTMLQuery ()
- htmlQueryGet :: Int -> HTMLQuery HTMLNode
- htmlQueryGetZipper :: Int -> HTMLQuery HTMLZipper
- htmlQuerySrc :: HTMLQuery HTMLNode
- htmlQueryAttr :: Text -> HTMLQuery ()
- htmlQueryAttrVal :: Text -> Text -> HTMLQuery ()
- htmlQueryId :: Text -> HTMLQuery ()
- htmlQueryHasClass :: Text -> HTMLQuery ()
- htmlQueryOnly :: Text -> HTMLQuery ()
Documentation
Defines the type for a query.
htmlQueryTry :: HTMLQuery HTMLNode -> HTMLNode -> HTMLNode Source #
Same as run with the arguments flipped.
htmlQueryStop :: HTMLQuery a Source #
Returns a result that stops the query.
htmlQueryCont :: HTMLQuery () Source #
Returns a result that continues the query.
htmlQuerySucc :: a -> HTMLQuery a Source #
Returns a successful query result.
htmlQueryZipper :: HTMLQuery HTMLZipper Source #
Gets the current query zipper.
htmlQueryNode :: HTMLQuery HTMLNode Source #
Gets the current query node.
htmlQueryFirst :: HTMLQuery () Source #
Moves the query to the first child node.
htmlQueryLast :: HTMLQuery () Source #
Moves the query to the last child node.
htmlQueryNext :: HTMLQuery () Source #
Moves the query to the next sibling node.
htmlQueryPrev :: HTMLQuery () Source #
Moves the query to the previous sibling node.
htmlQueryUp :: HTMLQuery () Source #
Moves the query to the parent node.
htmlQueryTest :: Bool -> HTMLQuery () Source #
Evaluates a test result and continues the query if true.
htmlQueryName :: Text -> HTMLQuery () Source #
Tests the current element name.
htmlQueryIsFirst :: HTMLQuery () Source #
Tests the current node to see if it is the first sibling.
htmlQueryIsLast :: HTMLQuery () Source #
Tests the current node to see if it is the last sibling.
htmlQuerySave :: Int -> HTMLQuery () Source #
Saves the current query state.
htmlQueryGetZipper :: Int -> HTMLQuery HTMLZipper Source #
Gets a saved query zipper.
htmlQuerySrc :: HTMLQuery HTMLNode Source #
Gets the source input node.
htmlQueryAttr :: Text -> HTMLQuery () Source #
Tests if the current node has an attribute.
htmlQueryAttrVal :: Text -> Text -> HTMLQuery () Source #
Tests if the current node has an attribute value.
htmlQueryId :: Text -> HTMLQuery () Source #
Tests if the current node has an id.
htmlQueryHasClass :: Text -> HTMLQuery () Source #
Tests if the current node has a class.
htmlQueryOnly :: Text -> HTMLQuery () Source #
Moves to the child and require that it is the only child.