Package org.zkoss.xml

## Class XMLs

- java.lang.Object
- - org.zkoss.xml.XMLs

-     public class XMLs
      extends java.lang.Object

  Deprecated.
  as of release 10.1.0, replaced with `Encode`
  The XML relevant utilities.
  Author:
    tomyeh
  See Also:
    `Element`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `XMLs()` | Deprecated.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static java.lang.String` | `encodeAttribute​(java.lang.String value)` | Deprecated. as of release 10.1.0, replaced with `Encode.forXmlAttribute(String)`
    `static java.lang.String` | `encodeText​(java.lang.String value)` | Deprecated. as of release 10.1.0, replaced with `Encode.forXmlContent(String)`
    `static java.lang.StringBuffer` | `encodeText​(java.lang.StringBuffer sb, java.lang.String value)` | Deprecated. as of release 10.1.0, replaced with `Encode.forXmlContent(String)`
    `static java.lang.StringBuffer` | `encodeText​(java.lang.StringBuffer sb, java.lang.String value, int begin, int end)` | Deprecated. as of release 10.1.0, replaced with `Encode.forXmlContent(String)`
    `static java.lang.String` | `escapeXML​(char cc)` | Deprecated. as of release 10.1.0, replaced with `Encode.forXml(String)`
    `static java.lang.String` | `escapeXML​(java.lang.String s)` | Deprecated. as of release 10.1.0, replaced with `Encode.forXml(String)`
    `static java.lang.String` | `toXMLName​(java.lang.String name)` | Deprecated. Converting a name to a valid XML name.

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

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

- - ### Constructor Detail

    - #### XMLs

          public XMLs()

      Deprecated.

  - ### Method Detail

    - #### toXMLName

          public static final java.lang.String toXMLName​(java.lang.String name)

      Deprecated.
      Converting a name to a valid XML name. Note: it is not reversible.

    - #### encodeAttribute

          public static final java.lang.String encodeAttribute​(java.lang.String value)

      Deprecated.
      as of release 10.1.0, replaced with `Encode.forXmlAttribute(String)`
      Encodes a value such that it could be used as XML attribute.

    - #### encodeText

          public static final java.lang.String encodeText​(java.lang.String value)

      Deprecated.
      as of release 10.1.0, replaced with `Encode.forXmlContent(String)`
      Encodes a value such that it could be enclosed by an XML element.

      Note: It is sometime improper to use CDATA if the text contains CDATA, too. The simplest way is NOT to use CDATA but encoding the string by this method.

    - #### encodeText

          public static final java.lang.StringBuffer encodeText​(java.lang.StringBuffer sb,
                                                                java.lang.String value)

      Deprecated.
      as of release 10.1.0, replaced with `Encode.forXmlContent(String)`
      Encodes a value and appends it to a string buffer, such that it could be enclosed by an XML element.

      Note: It is sometime improper to use CDATA if the text contains CDATA, too. The simplest way is NOT to use CDATA but encoding the string by this method.

    - #### encodeText

          public static final java.lang.StringBuffer encodeText​(java.lang.StringBuffer sb,
                                                                java.lang.String value,
                                                                int begin,
                                                                int end)

      Deprecated.
      as of release 10.1.0, replaced with `Encode.forXmlContent(String)`
      Encodes a value of the specified range, and appends it to a string buffer, such that it could be enclosed by an XML element.

      Note: It is sometime improper to use CDATA if the text contains CDATA, too. The simplest way is NOT to use CDATA but encoding the string by this method.

      Parameters:
        `value` - the string to encode
        `begin` - the beginning index, inclusive of the string to encode (i.e., value), included
        `end` - the ending index, exclusive of the string to encode (i.e., value), excluded
      Since:
        5.0.0

    - #### escapeXML

          public static final java.lang.String escapeXML​(java.lang.String s)

      Deprecated.
      as of release 10.1.0, replaced with `Encode.forXml(String)`
      Encodes a string that special characters are quoted to be compatible with HTML/XML. For example, < is translated to &lt;. & -> &amp;
      < -> &lt;
      > -> &gt;
      " -> &#034;
      ' -> &#039;
      Parameters:
        `s` - the string to quote; null is OK
      Returns:
        the escaped string, or an empty string if s is null

    - #### escapeXML

          public static final java.lang.String escapeXML​(char cc)

      Deprecated.
      as of release 10.1.0, replaced with `Encode.forXml(String)`
      Escapes a character into a string if it is a special XML character, returns null if not a special character. & -> &amp;
      < -> &lt;
      > -> &gt;
      " -> &#034;
      ' -> &#039;