shape-xml: Third parser in five days, XML joins JSON and YAML

Released shape-json last Thursday, shape-yaml over the weekend, now shape-xml.

All three parse into the same universal AST. Parse XML, render as JSON. Parse YAML, render as XML. One tree structure, format conversion built in.

XML-specific stuff:

  • Attributes mapped with @ prefix (@id, u/class)
  • Text content as #text, CDATA as #cdata
  • Namespace support preserved
  • Dual-path: fast validation (4-5x faster) vs full AST

This one came together fast. The core infrastructure carried over from the first two. Most of the work was just the grammar.

Repo: https://github.com/shapestone/shape-xml

Three formats down. JSON Schema validator is next.

Posted Dec 30, 2025, 9:05 PM UTC

10
Loading comments…