This parser was built with two main goals:
-
binary parsing
-
Namespace specific parsing
It also includes a parser parse transform (aka don't write these)for generating building fast parsers (for binaries).
The code is full of type specs, but dyalizer seems to crash... need to rewrite them to be less polymorphic.
-
src/parser_pt.erl
Will generate simple parsers from a specifiction embeded in the erlang code. -
src/exemell.erl
The main XML Parser. -
include/xml.hrl
Defines the record generated by the parser when reverting to pseudo DOM mode -
include/exemell.hrl
Exposes the internal state of full parser, usefull if you wish to set your own entity handling, meta handling or p.i. handling (or even to rewire the namespace handling). -
src/parser.hrl
The actual XML parser used byexemell.erl
. The parser is is not for the faint of heart but should make it obvious how to useparser_pt.erl
.
It's not the fastest parser out there, but its reasonably fast a very rough test places the parser at about:
- ~10% slower then erlsom
- twice as fast as xmerl As with any performance rating, take them with a lot of salt, and do your own measurments.
- No validation other then basic wellformedness is done (the parser will silently ignore missing close tags)
- The parser is hard coded to UTF8 encoding
- Other than sanity checking there's no testing done.
- Not all features are implemented yet (particularly skip and blob are not implemented).