I'm working with an API that returns a groovy.util.Node, allowing me to customize its generated XML. I need to append a child element into the Node, and I'm wondering if I can use MarkupBuilder syntax to modify the Node.
For example, here's something that works, but seems klunky:
withXml { rootNode ->
def appendedNode = new Node(rootNode, 'foo', [name:'bar'])
def appendedNodeChild = new Node(appendedNode, 'child', [blah:'baz'])
}
Is there a way to append to the rootNode using MarkupBuilder-ish syntax? Thanks.