# withXml

abstract fun withXml(@DelegatesTo(value = XmlProvider::class) closure: Closure): DeploymentDescriptor(source)

Adds a closure to be called when the XML document has been created. The XML is passed to the closure as a parameter in form of a groovy.util.Node. The closure can modify the XML before it is written to the output file. This allows additional JavaEE version 6 elements like "data-source" or "resource-ref" to be included.

#### Return

this

#### Since

1.0

#### Parameters

closure

The closure to execute when the XML has been created

abstract fun withXml(action: Action<in XmlProvider>): DeploymentDescriptor(source)

Adds an action to be called when the XML document has been created. The XML is passed to the action as a parameter in form of a groovy.util.Node. The action can modify the XML before it is written to the output file. This allows additional JavaEE version 6 elements like "data-source" or "resource-ref" to be included.

#### Return

this

#### Since

1.0

#### Parameters

action

The action to execute when the XML has been created