xmlhtml

XML parser and renderer with HTML 5 quirks mode

Version on this page:0.2.3.3@rev:1
LTS Haskell 22.19:0.2.5.4@rev:4
Stackage Nightly 2024-05-03:0.2.5.4@rev:4
Latest on Hackage:0.2.5.4@rev:4

See all snapshots xmlhtml appears in

BSD-3-Clause licensed and maintained by Chris Smith
This version can be pinned in stack with:xmlhtml-0.2.3.3@sha256:83177fd0467f61200293f42205a8611e6fb1034b91c418e29da06e9a83dab230,46266

Module documentation for 0.2.3.3

Contains renderers and parsers for both XML and HTML 5 document fragments, which share data structures so that it's easy to work with both. Document fragments are bits of documents, which are not constrained by some of the high-level structure rules (in particular, they may contain more than one root element).

Note that this is not a compliant HTML 5 parser. Rather, it is a parser for HTML 5 compliant documents. It does not implement the HTML 5 parsing algorithm, and should generally be expected to perform correctly only on documents that you trust to conform to HTML 5. This is not a suitable library for implementing web crawlers or other software that will be exposed to documents from outside sources. The result is also not the HTML 5 node structure, but rather something closer to the physical structure. For example, omitted start tags are not inserted (and so, their corresponding end tags must also be omitted).