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
operatorDSL were replaced by an explicit builder (xml::query::query_twithchild/descend/fork/match_*/acceptandfor_each/collect/has). The incompleteQueryBuilder/query-newdrafts 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. fmtis 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.
StorageFormoves instead of copying andStoredis 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,noexceptwas 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_textbracket loss and numeric entity handling were fixed;reordernow 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.