|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.xml.XMLDocument
public final class XMLDocument
A simple XML document object model (DOM), with methods for parsing and writing XML. If the boolean retainDOM is set to true, then the structure of the DOM is maintained, so that a subsequent call to write(...) would reproduce the input to build(...) However, if set to false, then a subsequent call to write(...) would produce an empty DOM. Note that if retainDOM is set to true, then the XMLDocument maintains two versions of the DOM in memory - an XML representation and an SDK representation This is probably acceptable for small, short lived DOMs.
XMLElement| Method Summary | |
|---|---|
static XMLDocument |
build(byte[] source,
boolean retainDOM)
Parses the XML document in the given source bytes. |
static XMLDocument |
build(java.io.File source,
boolean retainDOM)
Parses the XML document in the given source file. |
static XMLDocument |
build(java.io.InputStream source,
boolean retainDOM)
Parses the XML document in the given source. |
XMLElement |
getRootElement()
Gets the root element of this document. |
void |
write(java.io.File out)
Writes an XML representation of this document to the given file. |
void |
write(java.io.OutputStream out)
Writes an XML representation of this document to the given output stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static XMLDocument build(java.io.File source,
boolean retainDOM)
throws java.io.FileNotFoundException,
java.io.IOException,
XMLException
source - An XML document.retainDOM - True to retain the structure of the internal DOM, false to
shred it
XMLException
java.io.FileNotFoundException
java.io.IOException
public static XMLDocument build(byte[] source,
boolean retainDOM)
throws java.io.IOException,
XMLException
source - An XML document.retainDOM - True to retain the structure of the internal DOM, false to
shred it
XMLException
java.io.IOException
public static XMLDocument build(java.io.InputStream source,
boolean retainDOM)
throws java.io.IOException,
XMLException
source - An XML document.retainDOM - True to retain the structure of the internal DOM, false to
shred it
XMLException
java.io.IOException
public void write(java.io.File out)
throws java.io.FileNotFoundException,
java.io.IOException,
XMLException
out - The output file.
XMLException
java.io.FileNotFoundException
java.io.IOException
public void write(java.io.OutputStream out)
throws java.io.IOException,
XMLException
out - The output stream.
XMLException
java.io.IOExceptionpublic XMLElement getRootElement()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||