Practical guide and verification
Normalize only the differences you intend to ignore
Whitespace between XML elements may be formatting, while whitespace inside text nodes can be data. Namespace prefixes can differ while namespace URIs remain equivalent. Review the selected normalization behavior before calling two documents semantically equal.
Structural changes deserve more attention than raw line counts
Pretty-printing can move many lines without changing the XML tree. Use structural findings to focus on added or removed elements, attributes and values rather than treating every line movement as an equivalent semantic change.
Attribute order is not XML meaning
XML attribute order generally has no semantic significance, but a line-oriented diff may still display reordered attributes as changes. Distinguish serialization differences from actual name/value changes before approving or rejecting a document.
Namespaces must be compared by URI and context
Changing a namespace declaration can alter the meaning of many descendants even if local element names remain the same. Review namespace URI changes explicitly instead of relying only on visible prefixes.
Preserve both source documents until review is complete
A diff is evidence, not a merge engine. Keep both originals and, for high-value configuration or interchange files, validate the chosen final XML against its schema or consuming application after resolving changes.