XmlFileContentMerger (Gradle API 2.9)
Date: 2015-11-17

Package: org.gradle.plugins.ide.api

## [Groovy] Class XmlFileContentMerger

- org.gradle.plugins.ide.api.XmlFileContentMerger

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

  For examples see docs for EclipseProject or IdeaProject and others.

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `org.gradle.internal.xml.XmlTransformer` | `xmlTransformer`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `XmlFileContentMerger (org.gradle.internal.xml.XmlTransformer xmlTransformer)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `withXml(groovy.lang.Closure closure)` Adds a closure to be called when the file has been created.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class FileContentMerger` | `beforeMerged, whenMerged`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Property Detail

    - #### org.gradle.internal.xml.XmlTransformer xmlTransformer

  - ### Constructor Detail

    - #### XmlFileContentMerger(org.gradle.internal.xml.XmlTransformer xmlTransformer)

  - ### Method Detail

    - #### void withXml(groovy.lang.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.

      Parameters:
        `closure` - The closure to execute when the XML has been created.