|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjimm.twice.xml.dom.Document
This is a simple document class that only supports what we need. For example, there is no epilogue (misc. tags after the close of the root node).
To turn the document into an XML string, call toString
.
Field Summary | |
protected Doctype |
doctype
|
protected java.util.ArrayList |
prolog
|
protected Node |
rootNode
|
Constructor Summary | |
Document()
Constructor. |
Method Summary | |
void |
addToProlog(Element element)
Add element to prolog. |
Node |
getRootNode()
|
Node |
setRoot(Element element)
Creates a new node using the specified element, makes that node the root of the document, and returns the node. |
void |
setRootNode(Node node)
|
java.lang.String |
toString()
|
void |
writeTo(java.io.OutputStream out)
Writes this document as XML to the specified OutputStream . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.ArrayList prolog
protected Doctype doctype
protected Node rootNode
Constructor Detail |
public Document()
Method Detail |
public void addToProlog(Element element)
public Node getRootNode()
public void setRootNode(Node node)
public Node setRoot(Element element)
element
- an XML element
public void writeTo(java.io.OutputStream out) throws java.io.IOException
OutputStream
.
out
- a OutputStream
java.io.IOException
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |