# withXml

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

### Deprecated

Will be removed in Gradle 10.

Adds a closure to be called when the file has been created. The XML is passed to the closure as a parameter in form of a XmlProvider. The closure can modify the XML before it is written to the output file.

For examples see docs for org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.

#### Since

1.0

#### Parameters

closure

The closure to execute when the XML has been created.

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

### Deprecated

Will be removed in Gradle 10.

Adds an action to be called when the file has been created.

See withXml

#### Since

2.14

#### Parameters

action

The action to execute when the XML has been created.