Groovy MarkupBuilder name conflict
I have this code: String buildCatalog(Catalog catalog) { def writer = new StringWriter() def xml = new MarkupBuilder(writer) xml.catalog(xmlns:'http://www.sybrium.com/XMLSchema/NodeCatalog') { 'identity'() { groupId(catalog.groupId) artifactId(catalog.artifactId) version(catalog.version) } } return writer.toString(); } It produces this xml: <catalog xmlns='http://www.sybrium.com/XMLSchema/NodeCatalog'> <groupId>sample.group</groupId> <artifactId>sample-artifact</artifactId> <version>1.0.0</version> </catalog> Notice that the "identity" tag is missing... I've tried everything in the world to