org.mule.util
Class XMLEntityCodec

java.lang.Object
  extended by org.mule.util.XMLEntityCodec

public final class XMLEntityCodec
extends java.lang.Object

This encoder contains methods that convert characters to Character entities as defined by http://www.w3.org/TR/REC-html40/sgml/entities.html. More precisely it combines the functionality of StringEscapeUtils.escapeXml(String) and StringEscapeUtils.escapeHtml(String) into a single pass.


Constructor Summary
protected XMLEntityCodec()
           
 
Method Summary
static java.lang.String decodeString(java.lang.String str)
           
static java.lang.String encodeString(java.lang.String str)
           
static java.lang.String entityName(int value)
           Returns the name of the entity identified by the specified value.
static int entityValue(java.lang.String name)
           Returns the value of the entity identified by the specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLEntityCodec

protected XMLEntityCodec()
Method Detail

encodeString

public static java.lang.String encodeString(java.lang.String str)

decodeString

public static java.lang.String decodeString(java.lang.String str)

entityName

public static java.lang.String entityName(int value)

Returns the name of the entity identified by the specified value.

Parameters:
value - the value to locate
Returns:
entity name associated with the specified value

entityValue

public static int entityValue(java.lang.String name)

Returns the value of the entity identified by the specified name.

Parameters:
name - the name to locate
Returns:
entity value associated with the specified name


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.