escapeCharacters escapes & < > " ' characters from the text. This characters are
encoded using predefined XML entities: & < > " ' This metchod is written to operate on a
simple text which does not contain any XML elements or entities.
Parameters: text - a String value a String value
isCompatibleWithCDATA
final public static boolean isCompatibleWithCDATA(String text)(Code)
Can this text be stored into CDATA?
needsEncoding
final public static boolean needsEncoding(String text)(Code)
Checks if this text needs encoding in order to be represented in XML.
needsEncoding
final public static boolean needsEncoding(String data, boolean checkForAttr)(Code)
Checks if this text needs encoding in order to be represented in XML.
Set checkForAttr if you want to check for storability in an attribute.