org.apache.shindig.gadgets.parse
Class CompactHtmlSerializer
java.lang.Object
org.apache.shindig.gadgets.parse.DefaultHtmlSerializer
org.apache.shindig.gadgets.parse.CompactHtmlSerializer
- All Implemented Interfaces:
- HtmlSerializer
public class CompactHtmlSerializer
- extends DefaultHtmlSerializer
Performs simple content compaction while writing HTML documents. The compaction includes:
- Collapsing consecutive whitespaces while preserving those within style, pre and script tags
- Removing HTML comments while preserving IE conditional comments
TODO - Consider adding attribute quoting elimination, empty attribute elimination where safe
end-tag elmination where safe.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompactHtmlSerializer
public CompactHtmlSerializer()
writeText
protected void writeText(Node n,
Appendable output)
throws IOException
- Overrides:
writeText in class DefaultHtmlSerializer
- Throws:
IOException
writeComment
protected void writeComment(Node n,
Appendable output)
throws IOException
- Overrides:
writeComment in class DefaultHtmlSerializer
- Throws:
IOException
Copyright © 2007-2012. All Rights Reserved.