|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.xml.XMLs
public class XMLs
The XML relevant utilities.
Element
Constructor Summary | |
---|---|
XMLs()
|
Method Summary | |
---|---|
static java.lang.String |
encodeAttribute(java.lang.String value)
Encodes a value such that it could be used as XML attribute. |
static java.lang.String |
encodeText(java.lang.String value)
Encodes a value such that it could be enclosed by a XML elemnt. |
static java.lang.StringBuffer |
encodeText(java.lang.StringBuffer sb,
java.lang.String value)
Encodes a value and appends it to a string buffer, such that it could be enclosed by a XML elemnt. |
static java.lang.StringBuffer |
encodeText(java.lang.StringBuffer sb,
java.lang.String value,
int begin,
int end)
Encodes a value of the specified range, and appends it to a string buffer, such that it could be enclosed by a XML elemnt. |
static java.lang.String |
escapeXML(char cc)
Enscapes a character into a string if it is a special XML character, returns null if not a special character. |
static java.lang.String |
escapeXML(java.lang.String s)
Encodes a string that special characters are quoted to be compatible with HTML/XML. |
static java.lang.String |
toXMLName(java.lang.String name)
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 |
---|
public XMLs()
Method Detail |
---|
public static final java.lang.String toXMLName(java.lang.String name)
public static final java.lang.String encodeAttribute(java.lang.String value)
public static final java.lang.String encodeText(java.lang.String value)
Note: It is sometime inproper to use CDATA if the text contains CDATA, too. The simplest way is NOT to use CDATA but encoding the string by this method.
public static final java.lang.StringBuffer encodeText(java.lang.StringBuffer sb, java.lang.String value)
Note: It is sometime inproper to use CDATA if the text contains CDATA, too. The simplest way is NOT to use CDATA but encoding the string by this method.
public static final java.lang.StringBuffer encodeText(java.lang.StringBuffer sb, java.lang.String value, int begin, int end)
Note: It is sometime inproper to use CDATA if the text contains CDATA, too. The simplest way is NOT to use CDATA but encoding the string by this method.
value
- the string to encodebegin
- the beginning index, inclusive, of the string to encode (i.e., value), includingeend
- the ending index, exclusive of the string to encode (i.e., value), excludedpublic static final java.lang.String escapeXML(java.lang.String s)
s
- the string to quote; null is OK
public static final java.lang.String escapeXML(char cc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |