public class BasicXMLEncoder extends AbstractCharReplacementEncoder
Encoder implementation that escapes some characters for inclusion in XML documents Currently ', ", <, > and & characters are replaced with XML entities. Additionally backslash (/), non-breaking space, backtick (`) and @ are also replaced for visibility/additional security.
Modifiers | Name | Description |
---|---|---|
static CodecIdentifier |
XML_CODEC_IDENTIFIER |
Fields inherited from class | Fields |
---|---|
class AbstractCharReplacementEncoder |
codecIdentifier |
Constructor and description |
---|
BasicXMLEncoder
() |
protected BasicXMLEncoder
(CodecIdentifier codecIdentifier) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected java.lang.Object |
doEncode(java.lang.Object o) |
|
public final java.lang.Object |
encode(java.lang.Object o) |
|
protected java.lang.Object |
encodeAsXmlObject(java.lang.Object o) |
|
protected java.lang.String |
escapeCharacter(char ch, char previousChar) |
|
protected static final java.lang.String |
xmlEscapeCharacter(char ch) |
Methods inherited from class | Name |
---|---|
class AbstractCharReplacementEncoder |
convertToString, createChainingEncodesToWriter, doCharReplacementEncoding, encode, encodeToStream, encodeToWriter, encodeToWriter, escapeCharSequence, escapeCharacter, getCodecIdentifier, isApplyToSafelyEncoded, isSafe, markEncoded |