Skip to content

XML Conformance

Lanexio Parser implements XML 1.0 5th Edition with optional DTD validation. The conformance suite draws from the W3C XML Conformance Test Suite and libxml2 test corpus.

133 tests pass across three categories:

  • Well-formed fixtures — valid XML documents accepted, parse trees are well-formed and lossless
  • Not-well-formed fixtures — malformed documents flag errors correctly
  • libxml2 valid/ — production XML documents parsed cleanly with well-formed trees

The parser handles multi-byte character encodings (UTF-8, EUC-JP, Shift_JIS, ISO-2022-JP) and correctly emits errors for invalid byte sequences.

parseXml accepts an optional ExternalResolver for DTD fetching. When provided, the parser validates DTD entities, notations, and element declarations. When absent — the default — it parses the document without validation.

AxisResult
never-throw0 throws across 5,854 corpus files
well-formedcorpus WF = 0
losslesscorpus lossless = 0, byte-exact round-trip
conformance133/133, W3C + libxml2 covered