html-tokenizer-0.2.1.1: An "attoparsec"-based HTML tokenizer

Safe HaskellNone
LanguageHaskell2010

HTMLTokenizer.Parser

Contents

Synopsis

Model

data Token Source

An HTML token.

Constructors

Token_OpeningTag OpeningTag

An opening tag.

Token_ClosingTag (CI Text)

A closing tag name.

Token_Text Text

A text between tags with HTML-entities decoded.

Token_Comment Text

Contents of a comment.

type OpeningTag = (CI Text, [Attribute], Bool) Source

An opening tag name, attributes and whether it is closed.

type ClosingTag = CI Text Source

A closing tag name.

type Attribute = (CI Text, Maybe Text) Source

A tag attribute identifier and a value with HTML-entities decoded.

Parsers

token :: Parser Token Source

A token parser.