org.eclipse.ercp.xml.parser
Class CharDecoder

java.lang.Object
  extended by org.eclipse.ercp.xml.parser.CharDecoder

public class CharDecoder
extends java.lang.Object

Decodes special XML characters like: < & > ' " &#nnnn; Unicode character in decimal &#xnnnn; Unicode character in hexadecimal  


Constructor Summary
CharDecoder()
          Constructor
 
Method Summary
static CharDecoder forXml()
          Return a new CharDecoder with the predefined entities
 java.lang.String getCharValue(java.lang.String name)
          Return the character associated to the name if it exists, else return null.
 java.util.Hashtable getTable()
          Return a copy of the current character table.
static CharDecoder htmlCharacters()
          Set a CharDecoder with the main HTML characters id
 void setCharValue(java.lang.String name, java.lang.String value)
          Set the key-value decoding association
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharDecoder

public CharDecoder()
Constructor

Method Detail

getCharValue

public java.lang.String getCharValue(java.lang.String name)
Return the character associated to the name if it exists, else return null.


getTable

public java.util.Hashtable getTable()
Return a copy of the current character table.


forXml

public static CharDecoder forXml()
Return a new CharDecoder with the predefined entities


htmlCharacters

public static CharDecoder htmlCharacters()
Set a CharDecoder with the main HTML characters id


setCharValue

public void setCharValue(java.lang.String name,
                         java.lang.String value)
Set the key-value decoding association