BasicXMLEncoder (Grails 3.3.3)
Date: 2018-03-07

Package: org.grails.encoder.impl

## [Java] Class BasicXMLEncoder

- org.grails.encoder.impl.BasicXMLEncoder

- Encoder implementation that escapes some characters for inclusion in XML documents Currently ', ", <, > and & characters are replaced with XML entities. Additionally backslash (/), non-breaking space, backtick (`) and @ are also replaced for visibility/additional security.

  Authors:
    Lari Hotari
  Since:
    2.3

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static CodecIdentifier` | `XML_CODEC_IDENTIFIER` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractCharReplacementEncoder` | `codecIdentifier`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `BasicXMLEncoder ()`
    `protected BasicXMLEncoder (CodecIdentifier codecIdentifier)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected java.lang.Object` | `doEncode(java.lang.Object o)`
    `` | `java.lang.Object` | `encode(java.lang.Object o)`
    `` | `protected java.lang.Object` | `encodeAsXmlObject(java.lang.Object o)`
    `` | `protected java.lang.String` | `escapeCharacter(char ch, char previousChar)`
    `` | `protected static java.lang.String` | `xmlEscapeCharacter(char ch)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractCharReplacementEncoder` | `convertToString, createChainingEncodesToWriter, doCharReplacementEncoding, encode, encodeToStream, encodeToWriter, encodeToWriter, escapeCharSequence, escapeCharacter, getCodecIdentifier, isApplyToSafelyEncoded, isSafe, markEncoded`
    `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 CodecIdentifier XML_CODEC_IDENTIFIER

  - ### Constructor Detail

    - #### public BasicXMLEncoder()

    - #### protected BasicXMLEncoder(CodecIdentifier codecIdentifier)

  - ### Method Detail

    - #### protected java.lang.Object doEncode(java.lang.Object o)

    - #### @java.lang.Override public final java.lang.Object encode(java.lang.Object o)

    - #### protected java.lang.Object encodeAsXmlObject(java.lang.Object o)

    - #### @java.lang.Override protected java.lang.String escapeCharacter(char ch, char previousChar)

    - #### protected static final java.lang.String xmlEscapeCharacter(char ch)