I\'m writing unit tests for checking some XML builder.
Now I\'m running into the problem of syntactical differences between the expected result and the actual result
You can use the Groovy XMLUnit utility like this:
XMLUnit.setIgnoreWhitespace(true)
XMLUnit.setIgnoreComments(true)
XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true)
XMLUnit.setNormalizeWhitespace(true)
XMLUnit.compareXML(expectedXml, actualXml)
To compare XML files while ignoring the syntactical differences.