Package: grails.converters

## [Java] Class XML

- grails.converters.XML

- All Implemented Interfaces and Traits:
    IncludeExcludeConverter

      public class XML
      extends AbstractConverter

  A converter that converts domain classes to XML.

  Authors:
    Siegfried Puchbauer
    Graeme Rocher

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `class` | `XML.Builder` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static org.apache.commons.logging.Log` | `log` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractConverter` | `contentType, encoding, excludes, includes`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `XML ()`
    `XML (java.lang.Object target)`
    `XML (XMLStreamWriter writer)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `XML` | `attribute(java.lang.String name, java.lang.String value)`
    `void` | `build(groovy.lang.Closure c)`
    `XML` | `chars(java.lang.String chars)`
    `void` | `convertAnother(java.lang.Object o)`
    `static void` | `createNamedConfig(java.lang.String name, groovy.lang.Closure<?> callable)`
    `XML` | `end()`
    `int` | `getDepth()`
    `java.lang.String` | `getElementName(java.lang.Object o)`
    `static ConverterConfiguration<XML>` | `getNamedConfig(java.lang.String configName)`
    `StreamingMarkupWriter` | `getStream()`
    `XMLStreamWriter` | `getWriter()`
    `protected void` | `handleCircularRelationship(java.lang.Object o)`
    `protected ConverterConfiguration<XML>` | `initConfig()`
    `ObjectMarshaller<XML>` | `lookupObjectMarshaller(java.lang.Object target)`
    `static java.lang.Object` | `parse(java.lang.String source)` Parses the given XML
    `static java.lang.Object` | `parse(java.io.InputStream is, java.lang.String encoding)` Parses the given XML
    `static java.lang.Object` | `parse(javax.servlet.http.HttpServletRequest request)` Parses the give XML (read from the POST Body of the Request)
    `static void` | `registerObjectMarshaller(java.lang.Class<?> clazz, groovy.lang.Closure<?> callable)`
    `static void` | `registerObjectMarshaller(java.lang.Class<?> clazz, int priority, groovy.lang.Closure<?> callable)`
    `static void` | `registerObjectMarshaller(ObjectMarshaller<XML> om)`
    `static void` | `registerObjectMarshaller(ObjectMarshaller<XML> om, int priority)`
    `void` | `render(java.io.Writer out)`
    `void` | `render(javax.servlet.http.HttpServletResponse response)`
    `void` | `setExcludes(java.util.List<java.lang.String> excludes)`
    `void` | `setIncludes(java.util.List<java.lang.String> includes)`
    `void` | `setTarget(java.lang.Object target)`
    `XML` | `startNode(java.lang.String tagName)`
    `java.lang.String` | `toString()`
    `static java.lang.Object` | `use(java.lang.String configName, groovy.lang.Closure<?> callable)`
    `static void` | `use(java.lang.String cfgName)`
    `static void` | `withDefaultConfiguration(groovy.lang.Closure<?> callable)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractConverter` | `createBeanWrapper, getExcludes, getIncludes, setContentType, setEncoding, setExcludes, setIncludes, setTarget, toString`
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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()`

- - ### Field Detail

    - #### public static final org.apache.commons.logging.Log log

  - ### Constructor Detail

    - #### public XML()

    - #### public XML(java.lang.Object target)

    - #### public XML(XMLStreamWriter writer)

  - ### Method Detail

    - #### public XML attribute(java.lang.String name, java.lang.String value)

    - #### public void build(@java.lang.SuppressWarnings("rawtypes") groovy.lang.Closure c)

    - #### public XML chars(java.lang.String chars)

    - #### public void convertAnother(java.lang.Object o)

    - #### public static void createNamedConfig(java.lang.String name, groovy.lang.Closure<?> callable)

    - #### public XML end()

    - #### public int getDepth()

    - #### public java.lang.String getElementName(java.lang.Object o)

    - #### public static ConverterConfiguration<XML> getNamedConfig(java.lang.String configName)

    - #### public StreamingMarkupWriter getStream()

    - #### public XMLStreamWriter getWriter()

    - #### @java.lang.SuppressWarnings("incomplete-switch") protected void handleCircularRelationship(java.lang.Object o)

    - #### protected ConverterConfiguration<XML> initConfig()

    - #### public ObjectMarshaller<XML> lookupObjectMarshaller(java.lang.Object target)

    - #### public static java.lang.Object parse(java.lang.String source)

      Parses the given XML

      throws:
        ConverterException
      Parameters:
        `source` - a String containing some XML
      Returns:
        a groovy.util.XmlSlurper

    - #### public static java.lang.Object parse(java.io.InputStream is, java.lang.String encoding)

      Parses the given XML

      throws:
        ConverterException
      Parameters:
        `is` - an InputStream to read from
        `encoding` - the Character Encoding to use
      Returns:
        a groovy.util.XmlSlurper

    - #### public static java.lang.Object parse(javax.servlet.http.HttpServletRequest request)

      Parses the give XML (read from the POST Body of the Request)

      throws:
        ConverterException
      Parameters:
        `request` - an HttpServletRequest
      Returns:
        a groovy.util.XmlSlurper

    - #### public static void registerObjectMarshaller(java.lang.Class<?> clazz, groovy.lang.Closure<?> callable)

    - #### public static void registerObjectMarshaller(java.lang.Class<?> clazz, int priority, groovy.lang.Closure<?> callable)

    - #### public static void registerObjectMarshaller(ObjectMarshaller<XML> om)

    - #### public static void registerObjectMarshaller(ObjectMarshaller<XML> om, int priority)

    - #### public void render(java.io.Writer out)

    - #### public void render(javax.servlet.http.HttpServletResponse response)

    - #### @java.lang.Override public void setExcludes(java.util.List<java.lang.String> excludes)

    - #### @java.lang.Override public void setIncludes(java.util.List<java.lang.String> includes)

    - #### @java.lang.Override public void setTarget(java.lang.Object target)

    - #### public XML startNode(java.lang.String tagName)

    - #### @java.lang.Override public java.lang.String toString()

    - #### public static java.lang.Object use(java.lang.String configName, groovy.lang.Closure<?> callable)

    - #### public static void use(java.lang.String cfgName)

    - #### public static void withDefaultConfiguration(groovy.lang.Closure<?> callable)