Forum Discussion
nmrao
Champion Level 3
That is the default feature for XmlUnit.
Here you go to achieve what you are after
https://www.baeldung.com/xmlunit2
Here you go to achieve what you are after
https://www.baeldung.com/xmlunit2
PrathapR
5 years agoFrequent Contributor
Thanks nmrao ,
Also heared below answer from XMLUnit community,
The Diff object you get as a result of the comparison contains all differences and you can access them with diff.getDifferences(). The toString method of Diff that you invoke when you print it only prints the first difference.
So if you want to print all differences you'd do something like
for (Difference d : diff.getDifferences()) { System.err.println(d); }
For more control over the output take a look at ComparisonFomatter and Difference's one-arg toString method.
Related Content
- 5 years ago
- 2 years ago
- 2 years ago
Recent Discussions
- 15 years ago