Package: org.w3c.dom

## [Java] Interface Element

-     public interface Element

  GDK enhancements for Element.

  displayName:
    Element
  receiverFqcn:
    org.w3c.dom.Element

- - ### Methods Summary

    Methods
    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.

- - ### Method Detail

    - #### public String groovyToString()

      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.

      Returns:
        the serialized XML string
      Since:
        6.0.0

    - #### public String serialize()

      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.)

      Returns:
        the string representation of the element
      Since:
        2.1