public class XmlStringUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.StringBuilder |
appendEscapedSymbol(java.lang.String str,
java.lang.StringBuilder buffer,
int i,
java.lang.String entity,
char ch) |
static java.lang.String |
convertToHtmlContent(java.lang.String text)
Converts
text to a string which can be used inside an HTML document: if it's already an HTML text the root html/body tags will
be stripped, if it's a plain text special characters will be escaped |
static java.lang.String |
escapeIllegalXmlChars(java.lang.String text)
Some characters are illegal in XML even as numerical character references.
|
static java.lang.String |
escapeString(java.lang.String str) |
static java.lang.String |
escapeString(java.lang.String str,
boolean escapeWhiteSpace) |
static java.lang.String |
escapeString(java.lang.String str,
boolean escapeWhiteSpace,
boolean convertNoBreakSpace) |
static boolean |
isWrappedInHtml(java.lang.String tooltip) |
static java.lang.String |
stripHtml(java.lang.String toolTip) |
static java.lang.String |
unescapeIllegalXmlChars(java.lang.String text) |
static java.lang.String |
wrapInCDATA(java.lang.String str) |
static java.lang.String |
wrapInHtml(java.lang.CharSequence result) |
static java.lang.String |
wrapInHtmlLines(java.lang.CharSequence... lines) |
static java.lang.String |
wrapInHtmlTag(java.lang.String text,
java.lang.String tagWord) |
public static java.lang.String wrapInCDATA(java.lang.String str)
public static java.lang.String escapeString(java.lang.String str)
public static java.lang.String escapeString(java.lang.String str, boolean escapeWhiteSpace)
public static java.lang.String escapeString(java.lang.String str, boolean escapeWhiteSpace, boolean convertNoBreakSpace)
public static java.lang.StringBuilder appendEscapedSymbol(java.lang.String str, java.lang.StringBuilder buffer, int i, java.lang.String entity, char ch)
public static java.lang.String wrapInHtml(java.lang.CharSequence result)
public static java.lang.String wrapInHtmlLines(java.lang.CharSequence... lines)
lines
- Text to be used for example in multi-line labelspublic static java.lang.String wrapInHtmlTag(java.lang.String text, java.lang.String tagWord)
public static boolean isWrappedInHtml(java.lang.String tooltip)
public static java.lang.String stripHtml(java.lang.String toolTip)
public static java.lang.String convertToHtmlContent(java.lang.String text)
text
to a string which can be used inside an HTML document: if it's already an HTML text the root html/body tags will
be stripped, if it's a plain text special characters will be escapedpublic static java.lang.String escapeIllegalXmlChars(java.lang.String text)
unescapeIllegalXmlChars(String)
.
Resulting text can be part of XML version 1.0 document.Verifier#isXMLCharacter(int)
public static java.lang.String unescapeIllegalXmlChars(java.lang.String text)
escapeIllegalXmlChars(String)