- module Text.HTML.TagSoup
- type TagParser str = GenParser (Tag str) ()
- type TagParserSt str = GenParser (Tag str)
- type WholeTag str = (Tag str, [Tag str], Tag str)
- tParse :: (StringLike str, Show str) => TagParser str a -> [Tag str] -> a
- tStParse :: (StringLike str, Show str) => TagParserSt str st a -> st -> [Tag str] -> a
- openTag :: (StringLike str, Show str) => str -> TagParserSt str st (Tag str)
- maybeOpenTag :: (StringLike str, Show str) => str -> TagParserSt str st (Maybe (Tag str))
- eitherOpenTag :: (StringLike str, Show str) => str -> TagParserSt str st (Either (Tag str) (Tag str))
- notOpenTag :: (StringLike str, Show str) => str -> TagParserSt str st (Tag str)
- allOpenTags :: (StringLike str, Show str) => str -> TagParserSt str st [Tag str]
- wholeTag :: (StringLike str, Show str) => str -> TagParserSt str st (WholeTag str)
- maybeWholeTag :: (StringLike str, Show str) => str -> TagParserSt str st (Maybe (WholeTag str))
- eitherWholeTag :: (StringLike str, Show str) => str -> TagParserSt str st (Either (Tag str) (WholeTag str))
- allWholeTags :: (StringLike str, Show str) => str -> TagParserSt str st [WholeTag str]
- closeTag :: (StringLike str, Show str) => str -> TagParserSt str st (Tag str)
- maybeCloseTag :: (StringLike str, Show str) => str -> TagParserSt str st (Maybe (Tag str))
- eitherCloseTag :: (StringLike str, Show str) => str -> TagParserSt str st (Either (Tag str) (Tag str))
- notCloseTag :: (StringLike str, Show str) => str -> TagParserSt str st (Tag str)
- allCloseTags :: (StringLike str, Show str) => str -> TagParserSt str st [Tag str]
- maybeP :: Show tok => GenParser tok st a -> GenParser tok st (Maybe a)
- allP :: GenParser tok st (Maybe a) -> GenParser tok st [a]
- eitherP :: Show tok => GenParser tok st a -> GenParser tok st (Either tok a)
Documentation
module Text.HTML.TagSoup
type TagParserSt str = GenParser (Tag str)Source
A stateful tag parser This is a new type alias to allow backwards compatibility with old code.
type WholeTag str = (Tag str, [Tag str], Tag str)Source
A type represent the TagOpen, any inner tags , and the TagClose.
tParse :: (StringLike str, Show str) => TagParser str a -> [Tag str] -> aSource
Used to invoke parsing of Tags.
tStParse :: (StringLike str, Show str) => TagParserSt str st a -> st -> [Tag str] -> aSource
Simply run a stateful tag parser
openTag :: (StringLike str, Show str) => str -> TagParserSt str st (Tag str)Source
openTag matches a TagOpen with the given name. It is not case sensitive.
maybeOpenTag :: (StringLike str, Show str) => str -> TagParserSt str st (Maybe (Tag str))Source
eitherOpenTag :: (StringLike str, Show str) => str -> TagParserSt str st (Either (Tag str) (Tag str))Source
either a Right TagOpen or a Left arbitary tag.
notOpenTag :: (StringLike str, Show str) => str -> TagParserSt str st (Tag str)Source
notOpenTag will match any tag which is not a TagOpen with the given name. It is not case sensitive.
allOpenTags :: (StringLike str, Show str) => str -> TagParserSt str st [Tag str]Source
allOpenTags will return all TagOpen with the given name. It is not case sensitive.
wholeTag :: (StringLike str, Show str) => str -> TagParserSt str st (WholeTag str)Source
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 :: (StringLike str, Show str) => str -> TagParserSt str st (Maybe (WholeTag str))Source
eitherWholeTag :: (StringLike str, Show str) => str -> TagParserSt str st (Either (Tag str) (WholeTag str))Source
either a Right WholeTag or a Left arbitary tag.
allWholeTags :: (StringLike str, Show str) => str -> TagParserSt str st [WholeTag str]Source
allWholeTags will return all WholeTag with the given name. It is not case sensitive.
closeTag :: (StringLike str, Show str) => str -> TagParserSt str st (Tag str)Source
closeTag matches a TagClose with the given name. It is not case sensitive.
maybeCloseTag :: (StringLike str, Show str) => str -> TagParserSt str st (Maybe (Tag str))Source
eitherCloseTag :: (StringLike str, Show str) => str -> TagParserSt str st (Either (Tag str) (Tag str))Source
either a Right TagClose or a Left arbitary tag.
notCloseTag :: (StringLike str, Show str) => str -> TagParserSt str st (Tag str)Source
notCloseTag will match any tag which is not a TagClose with the given name. It is not case sensitive.
allCloseTags :: (StringLike str, Show str) => str -> TagParserSt str st [Tag str]Source
allCloseTags will return all TagClose with the given name. It is not case sensitive.