dom-selector- DOM traversal by CSS selectors for xml-conduit package

Safe HaskellNone



This module has query functions for traversing DOM. queryT, a quasiquote version, is also available in Text.XML.Selector.TH module.



query :: String -> AxisSource

Get Axis from jQuery selector string.

query1 :: String -> Cursor -> Maybe CursorSource

Return Just (the first element of query results). If no element matches, it returns Nothing.

showJQ :: [JQSelector] -> StringSource

Show a parsed selector. (parseJQ . showJQ) == id

byId :: String -> AxisSource

Axis for choosing elements by an id

byClass :: String -> AxisSource

Axis for choosing elements by a class

selectorMatch :: JQSelector -> Element -> BoolSource

Return if an element matches a selector

next :: Cursor -> Maybe CursorSource

Gets the next sibling. Note that this is not a Axis.

headm :: [a] -> Maybe aSource

queryMatchNode :: String -> Node -> BoolSource

Return if a node matches a selector given by string |Only first token is used (i.e. no hierarchy is enabled.)