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

Safe HaskellNone
LanguageHaskell2010

HTMLTokenizer

Contents

Synopsis

Model

data Token Source

An HTML token.

Constructors

Token_Doctype Text

A Doctype declaration.

Token_OpeningTag OpeningTag

An opening tag.

Token_ClosingTag Identifier

A closing tag.

Token_Text Text

A text between tags.

Token_Comment Text

Contents of a comment.

type OpeningTag = (Identifier, [Attribute], Bool) Source

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

type Attribute = (Identifier, Maybe Text) Source

A tag attribute identifier and a value.

Parsers

token :: Parser Token Source

A token parser.

Does not decode entities.