XmlParentNode.normalize

void normalize(bool recurse = true) @safe

Normalizes this subtree by merging adjacent XmlText nodes.

This is useful for downstream operations like canonicalization, XPath string-value evaluation, and deterministic testing.

Behavior:

  • Adjacent XmlText nodes are merged (concatenated into the first node).
  • Empty XmlText nodes are removed.
  • If recurse is true, normalization is applied recursively to child XmlParentNodes.

Parameters

recurseWhether to normalize all descendant subtrees.