com.quiotix.html.parser
Class HtmlDocument

java.lang.Object
  extended by com.quiotix.html.parser.HtmlDocument
All Implemented Interfaces:
Visitable

public class HtmlDocument
extends Object
implements Visitable

Represents an HTML document as a sequence of elements. The defined element types are: Tag, EndTag, TagBlock (matched tag..end tag, with the intervening elements), Comment, Text, Newline, and Annotation.

The various element types are defined as nested classes within HtmlDocument.

Author:
Brian Goetz, Quiotix
See Also:
HtmlVisitor

Nested Class Summary
static class HtmlDocument.Annotation
          Annotations.
static class HtmlDocument.Attribute
          A Tag Attribute.
static class HtmlDocument.AttributeList
          A List of Attributes.
static class HtmlDocument.Comment
          HTML comments.
static class HtmlDocument.ElementSequence
          A sequence of HTML elements.
static class HtmlDocument.EndTag
          Html end tag.
static class HtmlDocument.HtmlElement
          Abstract class for HTML elements.
static class HtmlDocument.Newline
          End of line indicator.
static class HtmlDocument.Tag
          HTML start tag.
static class HtmlDocument.TagBlock
          A tag block is a composite structure consisting of a start tag a sequence of HTML elements, and a matching end tag.
static class HtmlDocument.Text
          Plain text
 
Constructor Summary
HtmlDocument(HtmlDocument.ElementSequence s)
          Constructor.
 
Method Summary
 void accept(HtmlVisitor v)
          Allow the Visitor to visit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlDocument

public HtmlDocument(HtmlDocument.ElementSequence s)
Constructor.

Method Detail

accept

public void accept(HtmlVisitor v)
Description copied from interface: Visitable
Allow the Visitor to visit.

Specified by:
accept in interface Visitable
Parameters:
v - the visitor which has come to call


Copyright © 1999-2011 Quiotix. All Rights Reserved.