com.quiotix.html.parser
Class HtmlStripper

java.lang.Object
  extended by com.quiotix.html.parser.HtmlVisitor
      extended by com.quiotix.html.parser.HtmlDumper
          extended by com.quiotix.html.parser.HtmlStripper

public class HtmlStripper
extends HtmlDumper

A runnable class intended to produce readable, sparse html from formatted pages.

Author:
timp

Field Summary
protected static Set html1BlockTags
           
protected static String[] html1BlockTagStrings
           
protected static Set html1EmptyTags
           
protected static String[] html1EmptyTagStrings
           
protected static Set html1Tags
           
protected static String[] html4BlockTagStrings
           
 
Fields inherited from class com.quiotix.html.parser.HtmlDumper
out
 
Constructor Summary
HtmlStripper(OutputStream os)
           
HtmlStripper(OutputStream os, String encoding)
           
 
Method Summary
static void main(String[] args)
          Runnable.
 void visit(HtmlDocument.Comment comment)
          Visit a Comment.
 void visit(HtmlDocument.Tag t)
          Visit a Tag.
 void visit(HtmlDocument.TagBlock tagBlock)
          Visit a TagBlock.
 
Methods inherited from class com.quiotix.html.parser.HtmlDumper
finish, visit, visit, visit, visit
 
Methods inherited from class com.quiotix.html.parser.HtmlVisitor
start, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

html1BlockTags

protected static Set html1BlockTags

html1EmptyTags

protected static Set html1EmptyTags

html1Tags

protected static Set html1Tags

html1EmptyTagStrings

protected static String[] html1EmptyTagStrings

html1BlockTagStrings

protected static String[] html1BlockTagStrings

html4BlockTagStrings

protected static String[] html4BlockTagStrings
Constructor Detail

HtmlStripper

public HtmlStripper(OutputStream os)
Parameters:
os -

HtmlStripper

public HtmlStripper(OutputStream os,
                    String encoding)
             throws UnsupportedEncodingException
Parameters:
os -
encoding -
Throws:
UnsupportedEncodingException
Method Detail

visit

public void visit(HtmlDocument.TagBlock tagBlock)
Description copied from class: HtmlVisitor
Visit a TagBlock.

Overrides:
visit in class HtmlVisitor

visit

public void visit(HtmlDocument.Tag t)
Description copied from class: HtmlVisitor
Visit a Tag.

Overrides:
visit in class HtmlDumper

visit

public void visit(HtmlDocument.Comment comment)
Description copied from class: HtmlVisitor
Visit a Comment.

Overrides:
visit in class HtmlDumper

main

public static void main(String[] args)
                 throws Exception
Runnable.

Throws:
Exception


Copyright © 1999-2011 Quiotix. All Rights Reserved.