|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.util.Sgml
public class Sgml
The Sgml class contains static methods for processing SGML
into unicode characters. There is a method entityToCharacter(String)
which returns the unicode character corresponding to an SGML entity. There
is also a method replaceEntities(String,String) which performs
a substitution for entities in an input string.
See the following document for a complete list of over 1000 entities known by this class:
| Constructor Summary | |
|---|---|
Sgml()
|
|
| Method Summary | |
|---|---|
static Character |
entityToCharacter(String entity)
Returns the character represented by the specified SGML entity, or null if the entity is undefined. |
static String |
replaceEntities(String in)
Convenience method to call replaceEntities(String,String)
with the question marked used for unknown entities. |
static String |
replaceEntities(String in,
String unknownReplacement)
Returns the result of replacing all the entities appearing in the specified string with their corresponding unicode characters, using the specified replacement string for unknown entities. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sgml()
| Method Detail |
|---|
public static Character entityToCharacter(String entity)
null if the entity is undefined. Note that the
SGML entity should be passed in without its preceding ampersand
or following semicolon.
entity - Name of SGML entity (without initial ampersand
and final semicolon).
null if
it is undefined.
public static String replaceEntities(String in,
String unknownReplacement)
in - Input string.unknownReplacement - String with which to replace unknown
entities.
public static String replaceEntities(String in)
replaceEntities(String,String)
with the question marked used for unknown entities.
in - Input string.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||