XmlParentNode.normalize
void normalize(bool recurse = true) @safeNormalizes this subtree by merging adjacent XmlText nodes.
This is useful for downstream operations like canonicalization, XPath string-value evaluation, and deterministic testing.
Behavior:
- Adjacent
XmlTextnodes are merged (concatenated into the first node). - Empty
XmlTextnodes are removed. - If
recurseistrue, normalization is applied recursively to childXmlParentNodes.
Parameters
recurse | Whether to normalize all descendant subtrees. |