|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shindig.gadgets.parse.HtmlSerialization
public class HtmlSerialization
Static class with helpers to manage serialization of a Document. Binds an HtmlSerializer to a Document as user data, and pulls it out to achieve actual serialization.
| Field Summary | |
|---|---|
static String |
KEY
Used to key an instance of HtmlSerializer in document.getUserData |
static Set<String> |
URL_ATTRIBUTES
|
| Constructor Summary | |
|---|---|
HtmlSerialization()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY
public static final Set<String> URL_ATTRIBUTES
| Constructor Detail |
|---|
public HtmlSerialization()
| Method Detail |
|---|
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
IOException
public static boolean isUrlAttribute(org.apache.xerces.xni.QName name,
String attributeName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||