org.attoparser.markup.dom
Class AbstractAttoDOMVisitor

Object
  extended by org.attoparser.markup.dom.AbstractAttoDOMVisitor
All Implemented Interfaces:
AttoDOMVisitor
Direct Known Subclasses:
MarkupWriterAttoDOMVisitor

public abstract class AbstractAttoDOMVisitor
extends Object
implements AttoDOMVisitor

Common abstract class for visitors capable of traversing a attoDOM tree.

This class provides empty implementations for every method in the visitor, so that subclasses can override just the methods that are of interest for them.

Since:
1.0
Author:
Daniel Fernández

Constructor Summary
protected AbstractAttoDOMVisitor()
           
 
Method Summary
 void visitCDATASection(CDATASection cdataSection)
           Visit a CDATASection node.
 void visitCloseElement(Element element)
           Visit a non-standalone Element node after its children have been visited.
 void visitComment(Comment comment)
           Visit a Comment node.
 void visitDocType(DocType docType)
           Visit a DocType node.
 void visitEndDocument(Document document)
           Visit a Document node after its contents (children) have been visited.
 void visitOpenElement(Element element)
           Visit a non-standalone Element node before its children are visited.
 void visitProcessingInstruction(ProcessingInstruction processingInstruction)
           Visit a ProcessingInstruction node.
 void visitStandaloneElement(Element element)
           Visit a standalone Element node.
 void visitStartDocument(Document document)
           Visit a Document node before its contents (children) have been visited.
 void visitText(Text text)
           Visit a Text node.
 void visitXmlDeclaration(XmlDeclaration xmlDeclaration)
           Visit an XmlDeclaration node.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAttoDOMVisitor

protected AbstractAttoDOMVisitor()
Method Detail

visitStartDocument

public void visitStartDocument(Document document)
                        throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a Document node before its contents (children) have been visited.

This method does not need to traverse the document components (XML Declaration, DOCTYPE, root nodes).

Specified by:
visitStartDocument in interface AttoDOMVisitor
Parameters:
document - the document to be visited.
Throws:
AttoDOMVisitorException

visitEndDocument

public void visitEndDocument(Document document)
                      throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a Document node after its contents (children) have been visited.

This method does not need to traverse the document components (XML Declaration, DOCTYPE, root nodes).

Specified by:
visitEndDocument in interface AttoDOMVisitor
Parameters:
document - the document to be visited.
Throws:
AttoDOMVisitorException

visitXmlDeclaration

public void visitXmlDeclaration(XmlDeclaration xmlDeclaration)
                         throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit an XmlDeclaration node.

Specified by:
visitXmlDeclaration in interface AttoDOMVisitor
Parameters:
xmlDeclaration - the node to be visited.
Throws:
AttoDOMVisitorException

visitDocType

public void visitDocType(DocType docType)
                  throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a DocType node.

Specified by:
visitDocType in interface AttoDOMVisitor
Parameters:
docType - the node to be visited.
Throws:
AttoDOMVisitorException

visitProcessingInstruction

public void visitProcessingInstruction(ProcessingInstruction processingInstruction)
                                throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a ProcessingInstruction node.

Specified by:
visitProcessingInstruction in interface AttoDOMVisitor
Parameters:
processingInstruction - the node to be visited.
Throws:
AttoDOMVisitorException

visitStandaloneElement

public void visitStandaloneElement(Element element)
                            throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a standalone Element node.

Specified by:
visitStandaloneElement in interface AttoDOMVisitor
Parameters:
element - the element to be visited.
Throws:
AttoDOMVisitorException

visitOpenElement

public void visitOpenElement(Element element)
                      throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a non-standalone Element node before its children are visited.

This method does not need to traverse the element children, this will be done automatically after calling this handler.

Specified by:
visitOpenElement in interface AttoDOMVisitor
Parameters:
element - the element to be visited.
Throws:
AttoDOMVisitorException

visitCloseElement

public void visitCloseElement(Element element)
                       throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a non-standalone Element node after its children have been visited.

This method does not need to traverse the element children, this is done before calling this closing handler.

Specified by:
visitCloseElement in interface AttoDOMVisitor
Parameters:
element - the element to be visited.
Throws:
AttoDOMVisitorException

visitText

public void visitText(Text text)
               throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a Text node.

Specified by:
visitText in interface AttoDOMVisitor
Parameters:
text - the node to be visited.
Throws:
AttoDOMVisitorException

visitCDATASection

public void visitCDATASection(CDATASection cdataSection)
                       throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a CDATASection node.

Specified by:
visitCDATASection in interface AttoDOMVisitor
Parameters:
cdataSection - the node to be visited.
Throws:
AttoDOMVisitorException

visitComment

public void visitComment(Comment comment)
                  throws AttoDOMVisitorException
Description copied from interface: AttoDOMVisitor

Visit a Comment node.

Specified by:
visitComment in interface AttoDOMVisitor
Parameters:
comment - the node to be visited.
Throws:
AttoDOMVisitorException


Copyright © 2012 The ATTOPARSER team. All Rights Reserved.