tagsoup-0.13.3: Parsing and extracting information from (possibly malformed) HTML/XML documents

Safe HaskellSafe-Inferred

Text.HTML.TagSoup.Match

Description

Combinators to match tags. Some people prefer to use (~==) from Text.HTML.TagSoup, others prefer these more structured combinators. Which you use is personal preference.

Synopsis

Documentation

tagOpen :: (str -> Bool) -> ([Attribute str] -> Bool) -> Tag str -> BoolSource

match an opening tag

tagClose :: (str -> Bool) -> Tag str -> BoolSource

match an closing tag

tagText :: (str -> Bool) -> Tag str -> BoolSource

match a text

tagComment :: (str -> Bool) -> Tag str -> BoolSource

tagOpenLit :: Eq str => str -> ([Attribute str] -> Bool) -> Tag str -> BoolSource

match a opening tag's name literally

tagCloseLit :: Eq str => str -> Tag str -> BoolSource

match a closing tag's name literally

tagOpenAttrLit :: Eq str => str -> Attribute str -> Tag str -> BoolSource

tagOpenAttrNameLit :: Eq str => str -> str -> (str -> Bool) -> Tag str -> BoolSource

Match a tag with given name, that contains an attribute with given name, that satisfies a predicate. If an attribute occurs multiple times, all occurrences are checked.

tagOpenNameLit :: Eq str => str -> Tag str -> BoolSource

Check if the 'Tag str' is TagOpen and matches the given name

tagCloseNameLit :: Eq str => str -> Tag str -> BoolSource

Check if the 'Tag str' is TagClose and matches the given name

anyAttr :: ((str, str) -> Bool) -> [Attribute str] -> BoolSource

anyAttrName :: (str -> Bool) -> [Attribute str] -> BoolSource

anyAttrValue :: (str -> Bool) -> [Attribute str] -> BoolSource

anyAttrLit :: Eq str => (str, str) -> [Attribute str] -> BoolSource

anyAttrNameLit :: Eq str => str -> [Attribute str] -> BoolSource

anyAttrValueLit :: Eq str => str -> [Attribute str] -> BoolSource

getTagContent :: Eq str => str -> ([Attribute str] -> Bool) -> [Tag str] -> [Tag str]Source