# withXml

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

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

#### Parameters

closure

The closure to execute when the XML has been created

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

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

#### Parameters

action

The action to execute when the XML has been created