gov.nih.nlm.util
Class XMLEntityEncoder
java.lang.Object
gov.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
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 |
XMLEntityEncoder
public XMLEntityEncoder()
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