gov.nih.nlm.util
Class XMLEntityEncoder

java.lang.Object
  extended bygov.nih.nlm.util.XMLEntityEncoder

public abstract class XMLEntityEncoder
extends Object

Encodes a string with certain characters using XML character entities. The code in here is a modified version of a similar method from org.apache.xalan.client.XSLTProcessorApplet.

Author:
MEME Group

Constructor Summary
XMLEntityEncoder()
           
 
Method Summary
static String encode(String input)
          Encodes all of the XML character entities in the specified String so the resulting string can be safely used in a document without a CDATA section.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLEntityEncoder

public XMLEntityEncoder()
Method Detail

encode

public static String encode(String input)
Encodes all of the XML character entities in the specified String so the resulting string can be safely used in a document without a CDATA section.

Parameters:
input - the input String
Returns:
a String with XML character entities properly encoded


Copyright ©2005