Top Description Constructors Methods
com.thoughtworks.xstream.io.xml

public Class XmlFriendlyReplacer

extends XmlFriendlyNameCoder
Class Inheritance
Known Direct Subclasses
com.thoughtworks.xstream.io.xml.XStream11XmlFriendlyReplacer

Deprecated

As of 1.4, use XmlFriendlyNameCoder instead

Allows replacement of Strings in XML-friendly drivers. The default replacements are:
Authors
Mauro Talevi, Jörg Schaible, Tatu Saloranta
Since
1.2

Constructor Summary

AccessConstructor and Description
public
XmlFriendlyReplacer()

Deprecated As of 1.4, use XmlFriendlyNameCoder instead
Default constructor.
public
XmlFriendlyReplacer(String
the replacement for '$'
dollarReplacement
,
String
the replacement for '_'
underscoreReplacement
)

Deprecated As of 1.4, use XmlFriendlyNameCoder instead
Creates an XmlFriendlyReplacer with custom replacements

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The String with the escaped name
escapeName
(String
the name of attribute or node
name
)

Deprecated As of 1.4, use XmlFriendlyNameCoder instead
Escapes name substituting '$' and '_' with replacement strings
public String

Returns:

The String with unescaped name
unescapeName
(String
the name of attribute or node
name
)

Deprecated As of 1.4, use XmlFriendlyNameCoder instead
Unescapes name re-enstating '$' and '_' when replacement strings are found
Inherited from com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder:
clonecreateCacheMapdecodeAttributedecodeNodeencodeAttributeencodeNode

Constructor Detail

XmlFriendlyReplacerback to summary
public XmlFriendlyReplacer()

Deprecated

As of 1.4, use XmlFriendlyNameCoder instead

Default constructor.

XmlFriendlyReplacerback to summary
public XmlFriendlyReplacer(String dollarReplacement, String underscoreReplacement)

Deprecated

As of 1.4, use XmlFriendlyNameCoder instead

Creates an XmlFriendlyReplacer with custom replacements

Parameters
dollarReplacement:String

the replacement for '$'

underscoreReplacement:String

the replacement for '_'

Method Detail

escapeNameback to summary
public String escapeName(String name)

Deprecated

As of 1.4, use XmlFriendlyNameCoder instead

Escapes name substituting '$' and '_' with replacement strings

Parameters
name:String

the name of attribute or node

Returns:String

The String with the escaped name

unescapeNameback to summary
public String unescapeName(String name)

Deprecated

As of 1.4, use XmlFriendlyNameCoder instead

Unescapes name re-enstating '$' and '_' when replacement strings are found

Parameters
name:String

the name of attribute or node

Returns:String

The String with unescaped name