public abstract static class Constants.XMLConstants
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CDATA_END
"]]>"
|
static java.lang.String |
CDATA_START
"<![CDATA["
|
static java.lang.String |
PROPERTY_CLASSNAME
"classname"
|
static java.lang.String |
PROPERTY_PACKAGE
"package"
|
static java.lang.String |
SYMBOL_AND
"&"
|
static java.lang.String |
SYMBOL_APOS
"'"
|
static java.lang.String |
SYMBOL_BIGGER
">"
|
static java.lang.String |
SYMBOL_LESS
"<"
|
static java.lang.String |
SYMBOL_QUOTE
"\""
|
static java.lang.String[] |
SYMBOL_TO_ESCAPE
An array of symbols needing escape in XML document, such as & ' " < >
|
static java.lang.String |
XML_START
"<?XML"
|
Constructor and Description |
---|
XMLConstants() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escape(java.lang.String value)
Wrap the string in "" if it contains special symbols
SYMBOL_TO_ESCAPE ,
please refer to needEscape(String) . |
static boolean |
needEscape(java.lang.String value)
Some symbols, Such as "", "<", "&", "'", "\"" etc., are not permitted in XML document and they need to be escaped.
Currently the symbols SYMBOL_TO_ESCAPE will be checked. |
public static final java.lang.String CDATA_START
public static final java.lang.String CDATA_END
public static final java.lang.String XML_START
public static final java.lang.String PROPERTY_CLASSNAME
public static final java.lang.String PROPERTY_PACKAGE
public static final java.lang.String SYMBOL_AND
public static final java.lang.String SYMBOL_APOS
public static final java.lang.String SYMBOL_QUOTE
public static final java.lang.String SYMBOL_LESS
public static final java.lang.String SYMBOL_BIGGER
public static final java.lang.String[] SYMBOL_TO_ESCAPE
public static java.lang.String escape(java.lang.String value)
SYMBOL_TO_ESCAPE
,
please refer to needEscape(String)
.value
- String, the value to be escaped if it contains special symbolspublic static boolean needEscape(java.lang.String value)
SYMBOL_TO_ESCAPE
will be checked.value
- String, the value to testCopyright © SAS Institute. All Rights Reserved.