html-tokenizer-0.3.0.3: 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 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 Identifier = CI Text Source

A case-insensitive identifier.

type Attribute = (Identifier, Maybe Text) Source

A tag attribute identifier and a value.

Parsers

token :: Parser Token Source

A token parser.