tagsoup-parsec-0.0.3: Tokenizes Tag, so [ Tag ] can be used as parser input.Source codeContentsIndex
Text.HTML.TagSoup.Parsec
Synopsis
module Text.HTML.TagSoup
type TagParser = GenParser Tag ()
type WholeTag = (Tag, [Tag], Tag)
tParse :: TagParser a -> [Tag] -> a
openTag :: String -> TagParser Tag
maybeOpenTag :: String -> TagParser (Maybe Tag)
notOpenTag :: String -> TagParser Tag
allOpenTags :: String -> TagParser [Tag]
wholeTag :: String -> TagParser WholeTag
maybeWholeTag :: String -> TagParser (Maybe WholeTag)
allWholeTags :: String -> TagParser [WholeTag]
closeTag :: String -> TagParser Tag
maybeCloseTag :: String -> TagParser (Maybe Tag)
notCloseTag :: String -> TagParser Tag
allCloseTags :: String -> TagParser [Tag]
maybeP :: Show tok => GenParser tok st a -> GenParser tok st (Maybe a)
allP :: GenParser tok st (Maybe a) -> GenParser tok st [a]
Documentation
module Text.HTML.TagSoup
type TagParser = GenParser Tag ()Source
The Tag parser, using Tag as the token.
type WholeTag = (Tag, [Tag], Tag)Source
A type represent the TagOpen, any inner tags , and the TagClose.
tParse :: TagParser a -> [Tag] -> aSource
Used to invoke parsing of Tags.
openTag :: String -> TagParser TagSource
openTag matches a TagOpen with the given name. It is not case sensitive.
maybeOpenTag :: String -> TagParser (Maybe Tag)Source
maybeOpenTag will return Just the tag if it gets a TagOpen with he given name, It will return Nothing otherwise. It is not case sensitive.
notOpenTag :: String -> TagParser TagSource
notOpenTag will match any tag which is not a TagOpen with the given name. It is not case sensitive.
allOpenTags :: String -> TagParser [Tag]Source
allOpenTags will return all TagOpen with the given name. It is not case sensitive.
wholeTag :: String -> TagParser WholeTagSource
wholeTag matches a TagOpen with the given name, then all intervening tags, until it reaches a TagClose with the given name. It is not case sensitive.
maybeWholeTag :: String -> TagParser (Maybe WholeTag)Source
maybeWholeTag will return Just the tag if it gets a WholeTag with he given name, It will return Nothing otherwise. It is not case sensitive.
allWholeTags :: String -> TagParser [WholeTag]Source
allWholeTags will return all WholeTag with the given name. It is not case sensitive.
closeTag :: String -> TagParser TagSource
closeTag matches a TagClose with the given name. It is not case sensitive.
maybeCloseTag :: String -> TagParser (Maybe Tag)Source
maybeCloseTag will return Just the tag if it gets a TagClose with he given name, It will return Nothing otherwise. It is not case sensitive.
notCloseTag :: String -> TagParser TagSource
notCloseTag will match any tag which is not a TagClose with the given name. It is not case sensitive.
allCloseTags :: String -> TagParser [Tag]Source
allCloseTags will return all TagClose with the given name. It is not case sensitive.
maybeP :: Show tok => GenParser tok st a -> GenParser tok st (Maybe a)Source
maybeP takes a parser, and becomes its Maybe equivalent -- returning Just if it matches, and Nothing if it doesn't.
allP :: GenParser tok st (Maybe a) -> GenParser tok st [a]Source
allP takes a parser which returns a Maybe value, and returns a list of matching tokens.
Produced by Haddock version 2.4.2