BSD-3-Clause licensed and maintained by Neil Mitchell
This version can be pinned in stack with:hexml-0.3.5@sha256:e4338024155d7e6cca73510fe433a3161f728a125d19cbe8ba4442fe5489bdf8,1498

Module documentation for 0.3.5

Depends on 3 packages(full list with versions):
Used by 1 package in nightly-2024-11-11(full list with versions):

Hexml Hackage version Stackage version Build status

An XML DOM-style parser, that only parses a subset of XML, but is designed to be fast. In particular:

  • Entities, e.g. &, are not expanded.
  • Not all the validity conditions are checked.
  • No support for <!DOCTYPE related features.

The name “hexml” is a combination of “Hex” (a curse) and “XML”. The “X” should not be capitalised because the parser is more curse and less XML.

Hexml may be suitable if you want to quickly parse XML, from known sources, and a full XML parser has been shown to be a bottleneck. As an alternative to hexml, which supports things like entities but is still pretty fast, see Pugixml (with a Haskell binding - but be aware the Haskell binding can segfault).

Hexml is tested with AFL.

If you want lenses for Hexml, see hexml-lens.

The optimisation work around Hexml spawned Xeno, a Haskell-only alternative to Hexml. There is a talk covering the performance tricks of Hexml and Xeno.

Changes

Changelog for Hexml

0.3.5, released 2024-08-25
#1, add support for <![CDATA[ ... ]]>
0.3.4, released 2018-09-10
#15, licensed under BSD-3-Clause OR Apache-2.0
0.3.3, released 2017-10-27
#13, allow the . character in tags and attributes
0.3.2, released 2017-05-22
#10, mark the small fast FFI calls as "unsafe" (up to 10x faster)
0.3.1, released 2016-12-27
#9, don't walk off the end of the character table
0.3, released 2016-12-22
#8, Mac compatibility
Fix a bug when parsing closing comments
#7, prefix all the C functions with hexml_
0.2, released 2016-12-14
#6, remove buffer overruns
#5, add lower bounds
0.1, released 2016-12-04
Initial version