Package com.thoughtworks.xstream.io.xml
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, useXmlFriendlyNameCoder
insteadXmlFriendlyReplacer
(String dollarReplacement, String underscoreReplacement) Deprecated.As of 1.4, useXmlFriendlyNameCoder
instead -
Method Summary
Modifier and TypeMethodDescriptionescapeName
(String name) Deprecated.As of 1.4, useXmlFriendlyNameCoder
insteadunescapeName
(String name) Deprecated.As of 1.4, useXmlFriendlyNameCoder
insteadMethods inherited from class com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder
clone, createCacheMap, decodeAttribute, decodeNode, encodeAttribute, encodeNode
-
Constructor Details
-
XmlFriendlyReplacer
public XmlFriendlyReplacer()Deprecated.As of 1.4, useXmlFriendlyNameCoder
insteadDefault constructor. -
XmlFriendlyReplacer
Deprecated.As of 1.4, useXmlFriendlyNameCoder
insteadCreates an XmlFriendlyReplacer with custom replacements- Parameters:
dollarReplacement
- the replacement for '$'underscoreReplacement
- the replacement for '_'
-
-
Method Details
-
escapeName
Deprecated.As of 1.4, useXmlFriendlyNameCoder
insteadEscapes 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, useXmlFriendlyNameCoder
insteadUnescapes name re-enstating '$' and '_' when replacement strings are found- Parameters:
name
- the name of attribute or node- Returns:
- The String with unescaped name
-
XmlFriendlyNameCoder
instead