|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.attoparser.markup.dom.AbstractAttoDOMVisitor org.attoparser.markup.dom.MarkupWriterAttoDOMVisitor
public final class MarkupWriterAttoDOMVisitor
Implementation of AttoDOMVisitor
capable of writing an attoDOM
tree as markup code.
Constructor Summary | |
---|---|
MarkupWriterAttoDOMVisitor(Writer writer)
Create a new instance of this visitor, specifying the Writer
that will be used for outputting the markup code. |
Method Summary | |
---|---|
Writer |
getWriter()
|
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 |
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 |
visitText(Text text)
Visit a Text node. |
void |
visitXmlDeclaration(XmlDeclaration xmlDeclaration)
Visit an XmlDeclaration node. |
Methods inherited from class org.attoparser.markup.dom.AbstractAttoDOMVisitor |
---|
visitEndDocument, visitStartDocument |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MarkupWriterAttoDOMVisitor(Writer writer)
Create a new instance of this visitor, specifying the Writer
that will be used for outputting the markup code.
For example, this writer could be a StringWriter (for obtaining a String), an HttpServletResponse.getWriter(), etc.
writer
- the writer to be used as output.Method Detail |
---|
public Writer getWriter()
public void visitXmlDeclaration(XmlDeclaration xmlDeclaration) throws AttoDOMVisitorException
AttoDOMVisitor
Visit an XmlDeclaration
node.
visitXmlDeclaration
in interface AttoDOMVisitor
visitXmlDeclaration
in class AbstractAttoDOMVisitor
xmlDeclaration
- the node to be visited.
AttoDOMVisitorException
public void visitDocType(DocType docType) throws AttoDOMVisitorException
AttoDOMVisitor
Visit a DocType
node.
visitDocType
in interface AttoDOMVisitor
visitDocType
in class AbstractAttoDOMVisitor
docType
- the node to be visited.
AttoDOMVisitorException
public void visitProcessingInstruction(ProcessingInstruction processingInstruction) throws AttoDOMVisitorException
AttoDOMVisitor
Visit a ProcessingInstruction
node.
visitProcessingInstruction
in interface AttoDOMVisitor
visitProcessingInstruction
in class AbstractAttoDOMVisitor
processingInstruction
- the node to be visited.
AttoDOMVisitorException
public void visitStandaloneElement(Element element) throws AttoDOMVisitorException
AttoDOMVisitor
Visit a standalone Element
node.
visitStandaloneElement
in interface AttoDOMVisitor
visitStandaloneElement
in class AbstractAttoDOMVisitor
element
- the element to be visited.
AttoDOMVisitorException
public void visitOpenElement(Element element) throws AttoDOMVisitorException
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.
visitOpenElement
in interface AttoDOMVisitor
visitOpenElement
in class AbstractAttoDOMVisitor
element
- the element to be visited.
AttoDOMVisitorException
public void visitCloseElement(Element element) throws AttoDOMVisitorException
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.
visitCloseElement
in interface AttoDOMVisitor
visitCloseElement
in class AbstractAttoDOMVisitor
element
- the element to be visited.
AttoDOMVisitorException
public void visitText(Text text) throws AttoDOMVisitorException
AttoDOMVisitor
Visit a Text
node.
visitText
in interface AttoDOMVisitor
visitText
in class AbstractAttoDOMVisitor
text
- the node to be visited.
AttoDOMVisitorException
public void visitCDATASection(CDATASection cdataSection) throws AttoDOMVisitorException
AttoDOMVisitor
Visit a CDATASection
node.
visitCDATASection
in interface AttoDOMVisitor
visitCDATASection
in class AbstractAttoDOMVisitor
cdataSection
- the node to be visited.
AttoDOMVisitorException
public void visitComment(Comment comment) throws AttoDOMVisitorException
AttoDOMVisitor
Visit a Comment
node.
visitComment
in interface AttoDOMVisitor
visitComment
in class AbstractAttoDOMVisitor
comment
- the node to be visited.
AttoDOMVisitorException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |