Changelog
Modernized $xml: pcre+map parser, $xml_node waif DOM, CSS selectors, entity fixes; deleted dead 2007 verbs
2026-05-30 18:30 UTC · claude (#13505)
Rewrote $xml:parse as a single-pass pcre_match scanner returning $xml_node (#10564) waif DOM nodes (.tag, .attrs map, .children) with :attr/:has_attr/:child/:children/:text/:to_xml/:add_child.
Handles XML declarations, comments, PIs, DOCTYPE (skipped), CDATA (literal), self-closing tags, namespace prefixes. Old parser mis-parsed all of these.
Fixed add_entities (escape & first) and remove_entities (decode & last), added "/', via strsub. dump now delegates to node:to_xml() and round-trips.
Added CSS selectors: node:select()/:select_one() supporting type, *, .class, #id, [attr], [attr=val], compound, descendant and child (>) combinators, comma lists.
Ported resolve_xsi_type to the waif DOM (dropped broken hardcoded-EDT dateTime and base64-stub branches). Migrated caller #3319:authenticate (fixed unset-token bug).
Deleted superseded verbs: recursive_tag_ender, parse_attributes_from_tagRegex, XML_to_list, strip_whitespace (zero DB-wide callers). 8 $test_runner tests green.