xmlhtml-0.1.7: XML parser and renderer with HTML 5 quirks mode

Safe HaskellSafe-Infered

Text.XmlHtml.XML.Parse

Synopsis

Documentation

docFragment :: Encoding -> Parser DocumentSource

This is my best guess as to the best rule for handling document fragments for processing. It is essentially modeled after document, but allowing multiple nodes.

charData :: Parser NodeSource

The requirement to not contain ]]> is for SGML compatibility. We deliberately choose to not enforce it. This makes the parser accept strictly more documents than a standards-compliant parser.

processingInstruction :: Parser (Maybe Node)Source

Always returns Nothing since there's no representation for a PI in the document tree.

xmlDecl :: Parser (Maybe Text)Source

Return value is the encoding, if present.

docTypeDecl :: Parser DocTypeSource

Internal subset is parsed, but ignored since we don't have data types to store it.

internalDoctype :: Parser InternalSubsetSource

Internal DOCTYPE subset. We don't actually parse this; just scan through and look for the end, and store it in a block of text.

emptyOrStartTag :: Parser (Text, [(Text, Text)], Bool)Source

Results are (tag name, attributes, isEmpty)