com.borland.starteam.xml
Class XMLDocument

java.lang.Object
  |
  +--com.borland.starteam.xml.XMLDocument

public class XMLDocument
extends java.lang.Object

A simple XML document object model (DOM), with methods for parsing and writing XML.

See Also:
XMLElement

Method Summary
static XMLDocument build(byte[] source)
          Parses the XML document in the given source bytes.
static XMLDocument build(java.io.File source)
          Parses the XML document in the given source file.
static XMLDocument build(java.io.InputStream source)
          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

build

public static XMLDocument build(java.io.File source)
                         throws java.io.FileNotFoundException,
                                java.io.IOException,
                                XMLException
Parses the XML document in the given source file.

Parameters:
source - An XML document.
Returns:
A parsed DOM representation of the XML document.
Throws:
XMLException
java.io.FileNotFoundException
java.io.IOException

build

public static XMLDocument build(byte[] source)
                         throws java.io.IOException,
                                XMLException
Parses the XML document in the given source bytes.

Parameters:
source - An XML document.
Returns:
A parsed DOM representation of the XML document.
Throws:
XMLException
java.io.IOException

build

public static XMLDocument build(java.io.InputStream source)
                         throws java.io.IOException,
                                XMLException
Parses the XML document in the given source.

Parameters:
source - An XML document.
Returns:
A parsed DOM representation of the XML document.
Throws:
XMLException
java.io.IOException

write

public void write(java.io.File out)
           throws java.io.FileNotFoundException,
                  java.io.IOException,
                  XMLException
Writes an XML representation of this document to the given file.

Parameters:
out - The output file.
Throws:
XMLException
java.io.FileNotFoundException
java.io.IOException

write

public void write(java.io.OutputStream out)
           throws java.io.IOException,
                  XMLException
Writes an XML representation of this document to the given output stream.

Parameters:
out - The output stream.
Throws:
XMLException
java.io.IOException

getRootElement

public XMLElement getRootElement()
Gets the root element of this document.

Returns:
The root element of this document.


StarTeam SDK 10.0, Build 58
Copyright © 2003-2004 Borland Software Corporation. All rights reserved.