XmlFileContentMerger - Gradle DSL Version 2.14.1

# XmlFileContentMerger

API Documentation: | `XmlFileContentMerger`

Models the generation/parsing/merging capabilities. Adds XML-related hooks.

For examples see docs for `EclipseProject` or `IdeaProject` and others.

### Properties

No properties

### Methods

Method | Description
`beforeMerged(closure)` | Adds a closure to be called after content is loaded from existing file but before gradle build information is merged.
`whenMerged(closure)` | Adds a closure to be called after content is loaded from existing file and after gradle build information is merged.
`withXml(closure)` | 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.
`withXml(action)` | Incubating Adds an action to be called when the file has been created.

### Script blocks

No script blocks

### Method details

#### `void` `beforeMerged`(`Closure` closure)

Adds a closure to be called after content is loaded from existing file but before gradle build information is merged.

This is advanced api that gives access to internal implementation. It might be useful if you want to alter the way gradle build information is merged into existing file content.

For examples see docs for `EclipseProject` or `IdeaProject` and others.

#### `void` `whenMerged`(`Closure` closure)

Adds a closure to be called after content is loaded from existing file and after gradle build information is merged.

This is advanced api that gives access to internal implementation of idea plugin. Use it only to tackle some tricky edge cases.

For examples see docs for `EclipseProject` or `IdeaProject` and others.

#### `void` `withXml`(`Closure` closure)

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 `EclipseProject` or `IdeaProject` and others.

#### `void` `withXml`(``Action`<? super `XmlProvider`>` action)

Note: This method is incubating and may change in a future version of Gradle.

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

See `XmlFileContentMerger.withXml(groovy.lang.Closure)`