|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.util.HTMLTools
public class HTMLTools
This class holds a number of handy static methods for use in HTML and XML processing.
Constructor Summary | |
---|---|
HTMLTools()
|
Method Summary | |
---|---|
static String |
encodeCharacterEntityReferences(String input,
boolean isSGML)
Encodes a regular String with caracter entity references, for example the ampersand character & becomes &. |
static StringBuffer |
javaScriptEncode(char[] chars)
Encodes an Array of chars so that they will be valid inside JavaScript quotes. |
static StringBuffer |
javaScriptEncode(String string)
Encodes a String so that it will be valid inside JavaScript quotes. |
static String |
javaScriptEncodeToStr(String string)
Same behavior as javaScriptEncode(char[]) . |
static String |
removeHTMLComments(String input)
Removes all HTML comments from a String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HTMLTools()
Method Detail |
---|
public static String removeHTMLComments(String input)
input
- HTML String
public static String encodeCharacterEntityReferences(String input, boolean isSGML)
input
- A String.isSGML
- True if the input string is a an SGML variant such as HTML or XML, false if not.
public static final StringBuffer javaScriptEncode(char[] chars)
chars
- An array of chars
public static final StringBuffer javaScriptEncode(String string)
string
- A String
public static final String javaScriptEncodeToStr(String string)
javaScriptEncode(char[])
.
string
- A String
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |