public class HtmlSerialization extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY
Used to key an instance of HtmlSerializer in
document.getUserData
|
static Set<String> |
URL_ATTRIBUTES |
| Constructor and Description |
|---|
HtmlSerialization() |
| Modifier and Type | Method and Description |
|---|---|
static void |
attach(Document doc,
HtmlSerializer serializer,
String originalContent)
Attach a serializer instance to the document
|
static StringWriter |
createWriter(Document doc)
Create a writer sized to the original length of the document
|
static boolean |
isUrlAttribute(org.apache.xerces.xni.QName name,
String attributeName)
Returns true if the listed attribute is an URL attribute.
|
static void |
printEscapedText(CharSequence text,
Appendable output) |
static String |
serialize(Document doc)
Call the attached serializer and output the document
|
public static final String KEY
public static void attach(Document doc, HtmlSerializer serializer, String originalContent)
doc - serializer - originalContent - may be nullpublic static StringWriter createWriter(Document doc)
doc - public static String serialize(Document doc)
doc - public static void printEscapedText(CharSequence text, Appendable output) throws IOException
IOExceptionpublic static boolean isUrlAttribute(org.apache.xerces.xni.QName name,
String attributeName)
Copyright © 2007-2012. All Rights Reserved.