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

Safe Haskell | Safe-Inferred
Language | Haskell98

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

- tagOpen :: (str -> Bool) -> ([Attribute str] -> Bool) -> Tag str -> Bool
- tagClose :: (str -> Bool) -> Tag str -> Bool
- tagText :: (str -> Bool) -> Tag str -> Bool
- tagComment :: (str -> Bool) -> Tag str -> Bool
- tagOpenLit :: Eq str => str -> ([Attribute str] -> Bool) -> Tag str -> Bool
- tagCloseLit :: Eq str => str -> Tag str -> Bool
- tagOpenAttrLit :: Eq str => str -> Attribute str -> Tag str -> Bool
- tagOpenAttrNameLit :: Eq str => str -> str -> (str -> Bool) -> Tag str -> Bool
- tagOpenNameLit :: Eq str => str -> Tag str -> Bool
- tagCloseNameLit :: Eq str => str -> Tag str -> Bool
- anyAttr :: ((str, str) -> Bool) -> [Attribute str] -> Bool
- anyAttrName :: (str -> Bool) -> [Attribute str] -> Bool
- anyAttrValue :: (str -> Bool) -> [Attribute str] -> Bool
- anyAttrLit :: Eq str => (str, str) -> [Attribute str] -> Bool
- anyAttrNameLit :: Eq str => str -> [Attribute str] -> Bool
- anyAttrValueLit :: Eq str => str -> [Attribute str] -> Bool
- getTagContent :: Eq str => str -> ([Attribute str] -> Bool) -> [Tag str] -> [Tag str]

# Documentation

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

match an opening tag

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

match an closing tag

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

match a text

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

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

match a opening tag's name literally

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

match a closing tag's name literally

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

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

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

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

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

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

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

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

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

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

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

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

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