|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.quiotix.html.parser.HtmlVisitor com.quiotix.html.parser.HtmlCollector
public class HtmlCollector
An HtmlVisitor which modifies the structure of the document so that begin tags are matched properly with end tags and placed in TagBlock elements. Typically, an HtmlDocument is created by the parser, which simply returns a flat list of elements. The HtmlCollector takes this flat list and gives it the structure that is implied by the HTML content.
Field Summary | |
---|---|
protected boolean |
collected
|
protected static Set |
dontMatch
|
protected static String[] |
dontMatchStrings
|
protected com.quiotix.html.parser.HtmlCollector.ElementStack |
elements
|
protected com.quiotix.html.parser.HtmlCollector.ElementStack |
tagStack
|
Constructor Summary | |
---|---|
HtmlCollector()
|
Method Summary | |
---|---|
static void |
main(String[] args)
Runnable. |
protected int |
pushNode(HtmlDocument.HtmlElement e)
|
void |
visit(HtmlDocument.Comment c)
Visit a Comment. |
void |
visit(HtmlDocument.ElementSequence s)
Visit an ElementSequence. |
void |
visit(HtmlDocument.EndTag t)
Visit an EndTag. |
void |
visit(HtmlDocument.Newline n)
Visit a Newline. |
void |
visit(HtmlDocument.Tag t)
Visit a Tag. |
void |
visit(HtmlDocument.TagBlock bl)
Visit a TagBlock. |
void |
visit(HtmlDocument.Text t)
Visit Text. |
Methods inherited from class com.quiotix.html.parser.HtmlVisitor |
---|
finish, start, visit, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.quiotix.html.parser.HtmlCollector.ElementStack tagStack
protected com.quiotix.html.parser.HtmlCollector.ElementStack elements
protected boolean collected
protected static Set dontMatch
protected static String[] dontMatchStrings
Constructor Detail |
---|
public HtmlCollector()
Method Detail |
---|
protected int pushNode(HtmlDocument.HtmlElement e)
public void visit(HtmlDocument.Comment c)
HtmlVisitor
visit
in class HtmlVisitor
public void visit(HtmlDocument.Text t)
HtmlVisitor
visit
in class HtmlVisitor
public void visit(HtmlDocument.Newline n)
HtmlVisitor
visit
in class HtmlVisitor
public void visit(HtmlDocument.Tag t)
HtmlVisitor
visit
in class HtmlVisitor
public void visit(HtmlDocument.EndTag t)
HtmlVisitor
visit
in class HtmlVisitor
public void visit(HtmlDocument.TagBlock bl)
HtmlVisitor
visit
in class HtmlVisitor
public void visit(HtmlDocument.ElementSequence s)
HtmlVisitor
visit
in class HtmlVisitor
public static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |