A Groovy builder that works with Streaming API for XML (StAX) processors.
Here is a simple example using the StAX implementation of Java to generate XML:
link:{rootProjectDir}/subprojects/groovy-xml/src/spec/test/StaxBuilderTest.groovy[role=include]
An external library such as Jettison can be used as follows:
link:{rootProjectDir}/subprojects/groovy-xml/src/spec/test/StaxBuilderTest.groovy[role=include]