Class XmlFriendlyReplacer
java.lang.Object
com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder
com.thoughtworks.xstream.io.xml.XmlFriendlyReplacer
- Direct Known Subclasses:
XStream11XmlFriendlyReplacer
Deprecated.
Allows replacement of Strings in XML-friendly drivers. The default replacements are:
- $ (dollar) chars are replaced with _- (underscore dash) string.
- _ (underscore) chars are replaced with __ (double underscore) string.
- Since:
- 1.2
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.As of 1.4, useXmlFriendlyNameCoderinsteadXmlFriendlyReplacer(String dollarReplacement, String underscoreReplacement) Deprecated.As of 1.4, useXmlFriendlyNameCoderinstead -
Method Summary
Modifier and TypeMethodDescriptionescapeName(String name) Deprecated.As of 1.4, useXmlFriendlyNameCoderinsteadunescapeName(String name) Deprecated.As of 1.4, useXmlFriendlyNameCoderinsteadMethods inherited from class XmlFriendlyNameCoder
clone, createCacheMap, decodeAttribute, decodeNode, encodeAttribute, encodeNode
-
Constructor Details
-
XmlFriendlyReplacer
public XmlFriendlyReplacer()Deprecated.As of 1.4, useXmlFriendlyNameCoderinsteadDefault constructor. -
XmlFriendlyReplacer
Deprecated.As of 1.4, useXmlFriendlyNameCoderinsteadCreates an XmlFriendlyReplacer with custom replacements- Parameters:
dollarReplacement- the replacement for '$'underscoreReplacement- the replacement for '_'
-
-
Method Details
-
escapeName
Deprecated.As of 1.4, useXmlFriendlyNameCoderinsteadEscapes name substituting '$' and '_' with replacement strings- Parameters:
name- the name of attribute or node- Returns:
- The String with the escaped name
-
unescapeName
Deprecated.As of 1.4, useXmlFriendlyNameCoderinsteadUnescapes name re-enstating '$' and '_' when replacement strings are found- Parameters:
name- the name of attribute or node- Returns:
- The String with unescaped name
-
XmlFriendlyNameCoderinstead