This small test compares the following SAX-style XML parsers avaliable:
The following aspects are tested
- strict mode (parsing XML only)
- events:
openTag
,closeTag
,text
- attribute processing on
- entity decoding on
- namespace parsing on
Comparing parsers by bundled size:
parser | default | min+gzipped |
---|---|---|
sax-js | 40KB | 6.7 KB |
easysax | 20KB | 2.1KB |
saxen | 21KB | 2.6KB |
Parsing ./complex.bpmn
.
parser | average time |
---|---|
sax-js | 30.3ms |
easysax | 5.2ms |
saxen | 5.1ms |
Cf. tests.
npm install
# test minify
npm run minify
# test performance (in browser)
npm run perf
# open index.html in a web browser
🚀