Class PrettyHtmlSerializer
java.lang.Object
org.htmlcleaner.Serializer
org.htmlcleaner.HtmlSerializer
org.htmlcleaner.PrettyHtmlSerializer
Pretty HTML serializer - creates resulting HTML with indenting lines.
-
Field Summary
FieldsFields inherited from class Serializer
props -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringgetIndent(int level) private StringgetIndentedText(String content, int level) private StringgetSingleLineOfChildren(List<? extends BaseToken> children) protected voidprotected voidserializePrettyHtml(TagNode tagNode, Writer writer, int level, boolean isPreserveWhitespaces, boolean isLastNewLine) Methods inherited from class HtmlSerializer
dontEscape, escapeText, isMinimizedTagSyntax, serializeEndTag, serializeOpenTagMethods inherited from class Serializer
getAsString, getAsString, getAsString, getAsString, getAsString, isScriptOrStyle, write, write, writeToFile, writeToFile, writeToFile, writeToFile, writeToStream, writeToStream, writeToStream, writeToStream
-
Field Details
-
DEFAULT_INDENTATION_STRING
- See Also:
-
indentString
-
indents
-
-
Constructor Details
-
PrettyHtmlSerializer
-
PrettyHtmlSerializer
-
-
Method Details
-
serialize
- Specified by:
serializein classSerializer- Throws:
IOException
-
getIndent
- Parameters:
level-- Returns:
- Appropriate indentation for the specified depth.
-
getIndentedText
-
getSingleLineOfChildren
-
serializePrettyHtml
protected void serializePrettyHtml(TagNode tagNode, Writer writer, int level, boolean isPreserveWhitespaces, boolean isLastNewLine) throws IOException - Throws:
IOException
-