Class PrettyHtmlSerializer


public class PrettyHtmlSerializer extends HtmlSerializer

Pretty HTML serializer - creates resulting HTML with indenting lines.

  • Field Details

  • Constructor Details

  • Method Details

    • serialize

      protected void serialize(TagNode tagNode, Writer writer) throws IOException
      Specified by:
      serialize in class Serializer
      Throws:
      IOException
    • getIndent

      private String getIndent(int level)
      Parameters:
      level -
      Returns:
      Appropriate indentation for the specified depth.
    • getIndentedText

      private String getIndentedText(String content, int level)
    • getSingleLineOfChildren

      private String getSingleLineOfChildren(List<? extends BaseToken> children)
    • serializePrettyHtml

      protected void serializePrettyHtml(TagNode tagNode, Writer writer, int level, boolean isPreserveWhitespaces, boolean isLastNewLine) throws IOException
      Throws:
      IOException