api / org.gradle.api / XmlProvider

XmlProvider

interface XmlProvider

Provides various ways to access the content of an XML document.

Functions

asElement

abstract fun asElement(): Element

Returns the XML document as a DOM org.w3c.dom.Element. Changes to the returned instance will be applied to the XML. The returned instance is only valid until one of the other methods on this interface are called.

asNode

abstract fun asNode(): Node

Returns the XML document as a Groovy groovy.util.Node. Changes to the returned instance will be applied to the XML. The returned instance is only valid until one of the other methods on this interface are called.

asString

abstract fun asString(): StringBuilder

Returns the XML document as a StringBuilder. Changes to the returned instance will be applied to the XML. The returned instance is only valid until one of the other methods on this interface are called.