Skip to content

V0.3.1

vs.xml v0.3.1 is a large release focused on hardening, correctness and a cleaner API. The binary format changed, the query engine was redesigned, and a C binding was added.

Breaking#

  • Binary format moved to major revision. The header padding was fixed, so files produced by older revisions are rejected. Regenerate them plz.
  • Query engine has been rewritten. The previous generator and operator DSL were replaced by an explicit builder (xml::query::query_t with child/descend/fork/match_*/accept and for_each/collect/has). The incomplete QueryBuilder/query-new drafts were removed. Syntax sugar will come back later on.
  • All headers now live under include/vs-xml/, and the project builds with xmake; Meson and CMake were removed.
  • fmt is a required dependency.

Safety and correctness#

  • Binary loading validates the region, header, sections, symbols and alignment before dereferencing anything; the previously unused error codes are wired up.
  • StorageFor moves instead of copying and Stored is move-only, so owning views no longer alias freed storage.
  • Parser: errors are propagated, end tags are matched, nesting depth is bounded, invalid names are reported through error_t, noexcept was removed, and unterminated elements are errors.
  • Whitespace policy: whitespace-only text (formatting) is dropped, while whitespace that is part of real text is preserved. Comments and root declarations (DOCTYPE) are handled cleanly.
  • Serializer: the three printer implementations were consolidated into one pretty-printer driven by print_cfg_t; to_xml_text bracket loss and numeric entity handling were fixed; reorder now honors its comparator.

New features#

  • Pretty-printing (use_tabs, use_lf, spaces_in_tab, use_quote).
  • C bindings in <vs-xml/c.h> covering parse, documents/nodes, building and queries.