2 unstable releases

0.2.0 Jun 10, 2025
0.1.0 Jul 13, 2020

#2712 in Parser implementations

Download history 100/week @ 2025-10-06 39/week @ 2025-10-13 12/week @ 2025-10-20 8/week @ 2025-10-27

203 downloads per month

MIT/Apache

12KB
224 lines

txml

An XML parser. It's about ~200 SLOC but it:

  • Doesn't parse DTDs and therefore doesn't support custom entities
  • Doesn't validate DTDs, of course
  • Doesn't allow for streaming - you have to read the whole file at once
  • Doesn't reject all non-well-formed documents
  • Doesn't have any dependencies
  • Doesn't allocate, which is nice

This parser is not meant for any usecase where you're not certain that the document is well-formed, because it reports errors by simply ending the event stream early.

This parser may be useful for parsing machine-readable specifications that use XML such as Wayland and Vulkan.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps