public interface Element
GDK enhancements for Element.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public String |
groovyToString()Returns Groovy's default string representation for an XML Element. |
|
public String |
serialize()Transforms the element to its text equivalent. |
Returns Groovy's default string representation for an XML Element.
This is used by Groovy's formatting infrastructure. By default, it
serializes the element using groovy.xml.XmlUtil.serialize(Element).
If disabled, e.g. via -Dgroovy.extension.disable=groovyToString(Element),
the element's default toString() is used instead.
Alternatively, you have the option to provide a replacement extension method in an extension module
to customize how elements are displayed throughout Groovy.
Transforms the element to its text equivalent.
(The resulting string does not contain a xml declaration. Use XmlUtil.serialize(element) if you need the declaration.)