com.thoughtworks.xstream.io.xml
Class XmlFriendlyReplacer

java.lang.Object
  extended by com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder
      extended by com.thoughtworks.xstream.io.xml.XmlFriendlyReplacer
All Implemented Interfaces:
NameCoder, Cloneable
Direct Known Subclasses:
XStream11XmlFriendlyReplacer

Deprecated. As of 1.4, use XmlFriendlyNameCoder instead

public class XmlFriendlyReplacer
extends XmlFriendlyNameCoder

Allows replacement of Strings in XML-friendly drivers. The default replacements are:

Since:
1.2
Author:
Mauro Talevi, Jörg Schaible, Tatu Saloranta

Constructor Summary
XmlFriendlyReplacer()
          Deprecated. As of 1.4, use XmlFriendlyNameCoder instead
XmlFriendlyReplacer(String dollarReplacement, String underscoreReplacement)
          Deprecated. As of 1.4, use XmlFriendlyNameCoder instead
 
Method Summary
 String escapeName(String name)
          Deprecated. As of 1.4, use XmlFriendlyNameCoder instead
 String unescapeName(String name)
          Deprecated. As of 1.4, use XmlFriendlyNameCoder instead
 
Methods inherited from class com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder
clone, decodeAttribute, decodeNode, encodeAttribute, encodeNode
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlFriendlyReplacer

public XmlFriendlyReplacer()
Deprecated. As of 1.4, use XmlFriendlyNameCoder instead

Default constructor.


XmlFriendlyReplacer

public XmlFriendlyReplacer(String dollarReplacement,
                           String underscoreReplacement)
Deprecated. As of 1.4, use XmlFriendlyNameCoder instead

Creates an XmlFriendlyReplacer with custom replacements

Parameters:
dollarReplacement - the replacement for '$'
underscoreReplacement - the replacement for '_'
Method Detail

escapeName

public String escapeName(String name)
Deprecated. As of 1.4, use XmlFriendlyNameCoder instead

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

Parameters:
name - the name of attribute or node
Returns:
The String with the escaped name

unescapeName

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 - the name of attribute or node
Returns:
The String with unescaped name


Copyright © 2004-2014 XStream. All Rights Reserved.