Create xml with an element named dependencies failes

Hello there
We create xml files for the jboss server on the fly which works normally fine. But from now on we need an dependencies element which should be constructed this way:

def xmlBuilder = new groovy.xml.MarkupBuilder(sWriter)
         xmlBuilder.mkp.xmlDeclaration version: '1.0', encoding: 'UTF-8'
         xmlBuilder.'jboss-deployment-structure' {
            
            'dependencies'() {
               'dependencies'(name:'mySampleValue')
            }
         }
         
def f = new File(buildDir.toString()+File.separator+'jboss-deployment-structure.xml')
f.write(sWriter.toString())

This will result in an xml:

<dependencies name='mySampleValue'/>

But should be:

<dependencies>
  <dependencies name='mySampleValue'/>
</dependencies>

The problem is that an element with the keyword dependencies can’t be constructed. If an attribute is added it works fine. Is there an workaround for this problem?
Thanks for your help
Heiko

One option is to add a space:

'dependencies '()

What about…

    def xmlBuilder = new groovy.xml.MarkupBuilder(sWriter)
    xmlBuilder.with {
        mkp.xmlDeclaration version: '1.0', encoding: 'UTF-8'
        'jboss-deployment-structure' {
            dependencies {
                dependencies(name:'mySampleValue')
           }
       }
    }

Alternatively, just using xmlBuilder.dependencies also works.