|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.attoparser.markup.dom.Document
public final class Document
An attoDOM document, obtained from parsing a document using a
DOMMarkupAttoHandler
handler object.
Note that attoDOM trees are mutable.
Constructor Summary | |
---|---|
Document()
|
Method Summary | |
---|---|
DocType |
getDocType()
Return the DOCTYPE clause found at the document, if it exists. |
Element |
getRootElement()
Returns the only Element root node. |
List<Node> |
getRootNodes()
Returns the document root nodes. |
XmlDeclaration |
getXmlDeclaration()
Return the XML Declaration found at the document, if it exists. |
int |
numRootNodes()
Returns the number of root nodes. |
void |
visit(AttoDOMVisitor visitor)
Apply a visitor (implementation of AttoDOMVisitorException )
to this document, traversing all its nodes. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Document()
Method Detail |
---|
public XmlDeclaration getXmlDeclaration()
Return the XML Declaration found at the document, if it exists.
public DocType getDocType()
Return the DOCTYPE clause found at the document, if it exists.
public final int numRootNodes()
Returns the number of root nodes. Only one of them can be an
Element
.
public final List<Node> getRootNodes()
Returns the document root nodes. The returned list is immutable.
public final Element getRootElement()
Returns the only Element
root node.
public final void visit(AttoDOMVisitor visitor) throws AttoDOMVisitorException
Apply a visitor (implementation of AttoDOMVisitorException
)
to this document, traversing all its nodes.
A typical visitor implementation is MarkupWriterAttoDOMVisitor
.
visitor
- the visitor to be applied
AttoDOMVisitorException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |