XML Git Diff View
Compare the original XML text line by line alongside the normalized structural result.
The XML result page offers two complementary views. Data Compare asks whether the parsed XML differs under the selected comparison rules. Git Diff asks which lines of the original input text differ. Using both helps separate semantic changes from reformatting.
Open Git Diff
- Enter Base and Contrast XML documents and run a comparison.
- On the result page, use the view control in the top toolbar to switch from Data Compare to Git Diff.
- Review the original Base text on the left and Contrast text on the right in the side-by-side diff editor.
Git Diff is read-only. Return to the editors to change either input. To change semantic comparison options, switch back to Data Compare, where the Settings control is available.
Why the Views Can Disagree
| Question | Data Compare | Git Diff |
|---|---|---|
| What is compared? | Parsed elements, attributes, and text | The original text entered in each editor |
| What do options affect? | Repeated-element matching and case handling | Nothing; the original-text diff stays the same |
| Do indentation and line breaks matter? | No | Yes, when they change the text |
| Does attribute order matter? | No | Yes, when attributes move in the source |
| Does repeated-element order matter? | It depends on the selected comparison method | Reordered text can appear as a textual change |
| What is the result useful for? | Explaining structural and value changes | Locating exact source edits and formatting changes |
For example, changing only indentation or the order of attributes can leave Data Compare reporting Same, while Git Diff shows the source edits. Comments are ignored by Data Compare but remain visible to Git Diff. CDATA notation and numeric spelling can likewise change in the text without changing the normalized structural value.
The reverse can also happen. Enabling a case-insensitive option can suppress a Data Compare difference without removing the changed capitalization from Git Diff. Selecting Unordered can make reordered repeated elements semantically equal, but it does not remove their movement from the original-text diff.
Interpret Each View Correctly
Use Data Compare when you need actionable paths and difference types for added, deleted, or changed XML values. Its editors show XML reconstructed from parsed values, so comments, original indentation, CDATA notation, and numeric spelling are not guaranteed to survive in that display.
Use Git Diff when you need to audit the exact submitted text: whitespace-only edits, comments, attribute layout, or numeric spellings such as 2.5 versus 2.50. It compares the original text rather than the normalized result.
The name “Git Diff” describes the familiar side-by-side presentation. It does not compare commits, branches, or repository history. Both inputs must still be well-formed XML before the result page can be created.
A Practical Review Sequence
- Start in Data Compare. Choose XML comparison rules that reflect the document’s meaning.
- Inspect reported paths. Check that repeated elements are aligned as intended, especially after insertions or deletions.
- Switch to Git Diff for unexplained noise. Look for formatting, comments, attribute order, or spelling changes that are not semantic differences.
- Return to Data Compare to change settings. Git Diff remains a read-only view of the original text and cannot verify that a semantic option took effect.