Crate txml

Crate txml 

Source
Expand description

§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.

Structs§

Attrs
An iterator over XML attributes.
Parser
An iterator over XML events.

Enums§

Event
An XML event.
Text
A string that can contain XML entity references.