org.cybergarage.xml

## Class XML

- java.lang.Object
- - org.cybergarage.xml.XML

-     public class XML
      extends Object

  Utility class for XML character escaping and unescaping operations.

  This class provides static methods to escape and unescape XML special characters to ensure valid XML output and proper parsing of XML content.

  The following characters are handled:

  - & - escaped as &amp;
  - < - escaped as &lt;
  - > - escaped as &gt;
  - " - escaped as &quot; (when quotes are enabled)
  - ' - escaped as &apos; (when quotes are enabled)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CHARSET_UTF8`
    `static String` | `DEFAULT_CONTENT_LANGUAGE`
    `static String` | `DEFAULT_CONTENT_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XML()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `escapeXMLChars(String input)` Escapes XML special characters in the input string, including quotes.
    `static String` | `unescapeXMLChars(String input)` Unescapes XML entities in the input string.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CHARSET_UTF8

          public static final String CHARSET_UTF8

      See Also:
        Constant Field Values

    - #### DEFAULT_CONTENT_LANGUAGE

          public static final String DEFAULT_CONTENT_LANGUAGE

      See Also:
        Constant Field Values

    - #### DEFAULT_CONTENT_TYPE

          public static final String DEFAULT_CONTENT_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### XML

          public XML()

  - ### Method Detail

    - #### escapeXMLChars

          public static final String escapeXMLChars(String input)

      Escapes XML special characters in the input string, including quotes.

      This is a convenience method that calls `escapeXMLChars(String, boolean)` with quote set to true.

      Parameters:
        `input` - the string to escape, may be null
      Returns:
        the escaped string, or null if input is null

    - #### unescapeXMLChars

          public static final String unescapeXMLChars(String input)

      Unescapes XML entities in the input string.

      This method replaces the following XML entities with their characters:

      - &amp; - replaced with &
      - &lt; - replaced with <
      - &gt; - replaced with >
      - &apos; - replaced with '
      - &quot; - replaced with "
      Parameters:
        `input` - string to unescape, may be null
      Returns:
        the unescaped string, or null if input is null