Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.gradle.plugins.ide.api
[Groovy] Class XmlFileContentMerger

    java.lang.Object
      org.gradle.plugins.ide.api.FileContentMerger
          org.gradle.plugins.ide.api.XmlFileContentMerger

    class XmlFileContentMerger
    extends FileContentMerger

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

For examples see docs for EclipseProject or IdeaProject and others. @author: Szczepan Faber, created at: 4/21/11

Property Summary
`org.gradle.api.internal.XmlTransformer` | `xmlTransformer`

Constructor Summary
`XmlFileContentMerger(org.gradle.api.internal.XmlTransformer xmlTransformer)`

Method Summary
`void` | `withXml(groovy.lang.Closure closure)` Adds a closure to be called when the file has been created.

Methods inherited from class FileContentMerger
beforeMerged, whenMerged

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### xmlTransformer

    org.gradle.api.internal.XmlTransformer xmlTransformer

Constructor Detail

### XmlFileContentMerger

    XmlFileContentMerger(org.gradle.api.internal.XmlTransformer xmlTransformer)

Method Detail

### withXml

    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.

Groovy Documentation