Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines operations on html data types.
Synopsis
- htmlNodeIsElem :: HTMLNode -> Bool
- htmlNodeIsText :: HTMLNode -> Bool
- htmlNodeContent :: HTMLNode -> [HTMLNode]
- htmlNodeContentSet :: [HTMLNode] -> HTMLNode -> HTMLNode
- htmlNodeShow :: HTMLNode -> String
- htmlNodeFind :: (HTMLNode -> Bool) -> HTMLNode -> Maybe HTMLNode
- htmlNodeCount :: (HTMLNode -> Bool) -> HTMLNode -> Int
- htmlNodeCountM :: Monad m => (HTMLNode -> m Bool) -> HTMLNode -> m Int
- htmlTextSpace :: HTMLNode -> Bool
- htmlTextAppend :: Text -> HTMLNode -> HTMLNode
- htmlTextPrepend :: Text -> HTMLNode -> HTMLNode
- htmlAttrHasName :: Text -> HTMLAttr -> Bool
- htmlAttrRename :: Text -> HTMLAttr -> HTMLAttr
- htmlElemAttr :: HTMLNode -> [HTMLAttr]
- htmlElemAttrCount :: HTMLNode -> Int
- htmlElemAttrFind :: (HTMLAttr -> Bool) -> HTMLNode -> Maybe HTMLAttr
- htmlElemAttrFindName :: Text -> HTMLNode -> Maybe HTMLAttr
- htmlElemAttrApply :: ([HTMLAttr] -> [HTMLAttr]) -> HTMLNode -> HTMLNode
- htmlElemAttrFilter :: (HTMLAttr -> Bool) -> HTMLNode -> HTMLNode
- htmlElemAttrMap :: (HTMLAttr -> HTMLAttr) -> HTMLNode -> HTMLNode
- htmlElemHasAttr :: HTMLNode -> Bool
- htmlElemHasAttrName :: Text -> HTMLNode -> Bool
- htmlElemHasAttrVal :: Text -> Text -> HTMLNode -> Bool
- htmlElemHasAttrValInfix :: Text -> Text -> HTMLNode -> Bool
- htmlElemAddAttr :: HTMLAttr -> HTMLNode -> HTMLNode
- htmlElemSetAttr :: Text -> Text -> HTMLNode -> HTMLNode
- htmlElemGetAttr :: Text -> HTMLNode -> Maybe Text
- htmlElemAttrRemove :: Text -> HTMLNode -> HTMLNode
- htmlElemRemoveAllAttr :: HTMLNode -> HTMLNode
- htmlElemAttrRename :: Text -> Text -> HTMLNode -> HTMLNode
- htmlElemID :: HTMLNode -> Maybe Text
- htmlElemIDSet :: Text -> HTMLNode -> HTMLNode
- htmlElemHasID :: Text -> HTMLNode -> Bool
- htmlElemFindID :: Text -> HTMLNode -> Maybe HTMLNode
- htmlElemClass :: HTMLNode -> Maybe Text
- htmlElemClassSet :: Text -> HTMLNode -> HTMLNode
- htmlElemClasses :: HTMLNode -> Set Text
- htmlElemClassesSet :: Set Text -> HTMLNode -> HTMLNode
- htmlElemClassesAdd :: Text -> HTMLNode -> HTMLNode
- htmlElemClassesRemove :: Text -> HTMLNode -> HTMLNode
- htmlElemClassesContains :: Text -> HTMLNode -> Bool
- htmlElemStyle :: HTMLNode -> Maybe Text
- htmlElemStyles :: HTMLNode -> Map Text Text
- htmlElemStyleParseURL :: Text -> Maybe Text
- htmlElemContent :: HTMLNode -> [HTMLNode]
- htmlElemContentSet :: [HTMLNode] -> HTMLNode -> HTMLNode
- htmlElemHasContent :: HTMLNode -> Bool
- htmlElemNodeFirst :: HTMLNode -> Maybe HTMLNode
- htmlElemNodeLast :: HTMLNode -> Maybe HTMLNode
- htmlElemNodeCount :: HTMLNode -> Int
- htmlElemName :: HTMLNode -> Text
- htmlElemHasName :: Text -> HTMLNode -> Bool
- htmlElemRename :: Text -> HTMLNode -> HTMLNode
- htmlElemFindElem :: (HTMLNode -> Bool) -> HTMLNode -> Maybe HTMLNode
- htmlElemFindElemNamed :: Text -> HTMLNode -> Maybe HTMLNode
- htmlElemHasElem :: (HTMLNode -> Bool) -> HTMLNode -> Bool
- htmlElemHasElemNamed :: Text -> HTMLNode -> Bool
- htmlElemContentApply :: ([HTMLNode] -> [HTMLNode]) -> HTMLNode -> HTMLNode
- htmlElemContentMap :: (HTMLNode -> HTMLNode) -> HTMLNode -> HTMLNode
- htmlElemContentFilter :: (HTMLNode -> Bool) -> HTMLNode -> HTMLNode
- htmlElemSearch :: (HTMLNode -> Bool) -> HTMLNode -> Maybe HTMLNode
- htmlElemText :: HTMLNode -> Maybe Text
- htmlDocHtml :: HTMLNode -> Maybe HTMLNode
- htmlDocBody :: HTMLNode -> Maybe HTMLNode
- htmlDocHead :: HTMLNode -> Maybe HTMLNode
- htmlDocTitle :: HTMLNode -> Maybe Text
- htmlMapElem :: (HTMLNode -> HTMLNode) -> HTMLNode -> HTMLNode
- htmlMapElemM :: Monad m => (HTMLNode -> m HTMLNode) -> HTMLNode -> m HTMLNode
- htmlElemCollapse :: (HTMLNode -> Bool) -> HTMLNode -> [HTMLNode]
- htmlElemCollapseM :: Monad m => (HTMLNode -> m Bool) -> HTMLNode -> m [HTMLNode]
Documentation
htmlNodeIsElem :: HTMLNode -> Bool Source #
Determines if a node is an element node.
htmlNodeIsText :: HTMLNode -> Bool Source #
Determines if a node is a text node.
htmlNodeContent :: HTMLNode -> [HTMLNode] Source #
Gets the content of a node.
htmlNodeShow :: HTMLNode -> String Source #
Shows the node without its content.
htmlNodeFind :: (HTMLNode -> Bool) -> HTMLNode -> Maybe HTMLNode Source #
Finds a child node using a predicate.
htmlNodeCount :: (HTMLNode -> Bool) -> HTMLNode -> Int Source #
Counts the number of nodes matching a predicate.
htmlNodeCountM :: Monad m => (HTMLNode -> m Bool) -> HTMLNode -> m Int Source #
Counts the number of nodes matching a predicate.
htmlTextSpace :: HTMLNode -> Bool Source #
Determines if a node is a text node containing only whitespace.
htmlElemAttr :: HTMLNode -> [HTMLAttr] Source #
Gets the attributes for an element.
htmlElemAttrCount :: HTMLNode -> Int Source #
Gets the number of attributes for an element.
htmlElemAttrFind :: (HTMLAttr -> Bool) -> HTMLNode -> Maybe HTMLAttr Source #
Finds an attribute for an element.
htmlElemAttrFindName :: Text -> HTMLNode -> Maybe HTMLAttr Source #
Finds an attribute by name for an element.
htmlElemAttrApply :: ([HTMLAttr] -> [HTMLAttr]) -> HTMLNode -> HTMLNode Source #
Applies a function to the attributes for an element.
htmlElemAttrFilter :: (HTMLAttr -> Bool) -> HTMLNode -> HTMLNode Source #
Filters the attributes for an element.
htmlElemAttrMap :: (HTMLAttr -> HTMLAttr) -> HTMLNode -> HTMLNode Source #
Maps an endofunctor over an element attributes.
htmlElemHasAttr :: HTMLNode -> Bool Source #
Determines if the element has attributes.
htmlElemHasAttrVal :: Text -> Text -> HTMLNode -> Bool Source #
Determines if an element has an attribute value.
htmlElemHasAttrValInfix :: Text -> Text -> HTMLNode -> Bool Source #
Determines if an element has part of an attribute value.
htmlElemRemoveAllAttr :: HTMLNode -> HTMLNode Source #
Removes all attributes from an element.
htmlElemAttrRename :: Text -> Text -> HTMLNode -> HTMLNode Source #
Renames an attribute for an element.
htmlElemClassesRemove :: Text -> HTMLNode -> HTMLNode Source #
Removes a class from the element's classes.
htmlElemClassesContains :: Text -> HTMLNode -> Bool Source #
Determines if the element contains a class.
htmlElemContent :: HTMLNode -> [HTMLNode] Source #
Gets the children for the element if the node is an element.
htmlElemHasContent :: HTMLNode -> Bool Source #
Determines if the element has children.
htmlElemNodeCount :: HTMLNode -> Int Source #
Gets the number of children for an element.
htmlElemName :: HTMLNode -> Text Source #
Gets the name of an element.
htmlElemHasName :: Text -> HTMLNode -> Bool Source #
Checks if the name of an element matches a specified name.
htmlElemFindElem :: (HTMLNode -> Bool) -> HTMLNode -> Maybe HTMLNode Source #
Finds a child element using a predicate.
htmlElemFindElemNamed :: Text -> HTMLNode -> Maybe HTMLNode Source #
Finds a child element with a specified name.
htmlElemHasElem :: (HTMLNode -> Bool) -> HTMLNode -> Bool Source #
Determines if an element has a child.
htmlElemContentApply :: ([HTMLNode] -> [HTMLNode]) -> HTMLNode -> HTMLNode Source #
Modifies an elements children by applying a function.
htmlElemContentMap :: (HTMLNode -> HTMLNode) -> HTMLNode -> HTMLNode Source #
Modifies an elements children by mapping a function over them.
htmlElemContentFilter :: (HTMLNode -> Bool) -> HTMLNode -> HTMLNode Source #
Modifies an elements children by filtering them.
htmlElemSearch :: (HTMLNode -> Bool) -> HTMLNode -> Maybe HTMLNode Source #
Finds an element using a depth-first search.
htmlMapElem :: (HTMLNode -> HTMLNode) -> HTMLNode -> HTMLNode Source #
Maps a function over all the elements defined by a node.
htmlMapElemM :: Monad m => (HTMLNode -> m HTMLNode) -> HTMLNode -> m HTMLNode Source #
Maps a function over all the elements defined by a node.