public class EntityRefs
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
fromHtml(java.lang.String string,
Version htmlVersion)
Processes the input string and replaces all appearances of entity references that are valid under the htmlVersion specified with their actual codepoint value.
|
static java.lang.String |
fromXHtml(java.lang.String string,
Version xhtmlVersion)
Processes the input string and replaces all appearances of entity references that are valid under the htmlVersion specified with their actual codepoint value.
|
static java.lang.String |
toXML(java.lang.String string)
Gets the XML version of the input string, i.e.
|
public static java.lang.String fromHtml(java.lang.String string, Version htmlVersion)
string
- The input string to be "sanitized" from &#nnnn and &#xhhhh appearances, as well as any named entity refs valid in the given html Version.htmlVersion
- The version indicating which entity refs table to usepublic static java.lang.String fromXHtml(java.lang.String string, Version xhtmlVersion)
string
- The input string to be "sanitized" from &#nnnn and &#xhhhh appearances, as well as any named entity refs valid in the given html Version.xhtmlVersion
- The version indicating which entity refs table to usepublic static java.lang.String toXML(java.lang.String string)
string
- the string to be rendered to valid xml