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

Safe HaskellSafe
LanguageHaskell98

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 -> Bool Source

match an opening tag

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

match an closing tag

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

match a text

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

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

match a opening tag's name literally

tagCloseLit :: Eq str => str -> Tag str -> Bool Source

match a closing tag's name literally

tagOpenAttrLit :: Eq str => str -> Attribute str -> Tag str -> Bool Source

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

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 -> Bool Source

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

tagCloseNameLit :: Eq str => str -> Tag str -> Bool Source

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

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

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

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

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

anyAttrNameLit :: Eq str => str -> [Attribute str] -> Bool Source

anyAttrValueLit :: Eq str => str -> [Attribute str] -> Bool Source

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