Here is an example of using
StreamingMarkupBuilder to create a new XML file:
This will output XML similar to what we have been using in previous examples.
The example makes use of XMLUnit and a custom difference listener which ignores whitespace differences. It is called
IgnoreWhitespaceDifferenceListener and is shown below:
You may also want to see Using MarkupBuilder for Agile XML creation.