public class ClientDocument
extends java.lang.Object
implements java.io.Serializable
Defines a simple XML document.
A ClientDocument instance contains the root element of an XML hierarchy tree.
The middle-tier provides an XML parser and can construct an XML hierarchy
tree from XML, or convert a tree into XML.
ClientElement,
Serialized Form| Constructor and Description |
|---|
ClientDocument()
Internal: Applications should not use this constructor.
|
ClientDocument(ClientElement root)
Designates an XML element as the root of an XML hierarchy.
|
| Modifier and Type | Method and Description |
|---|---|
ClientElement |
getRoot()
Gets the root element of this
ClientDocument's XML hierarchy. |
static void |
main(java.lang.String[] args) |
void |
readXML(java.lang.String fileName)
Consructs the hierarchy tree from an XML file.
|
void |
writeXML(java.io.File file)
Writes the hierarchy tree in XML format to a file.
|
public ClientDocument()
public ClientDocument(ClientElement root)
root - an XML element.public ClientElement getRoot()
ClientDocument's XML hierarchy.public void writeXML(java.io.File file)
throws java.io.IOException
file - the destination file.java.io.IOExceptionpublic void readXML(java.lang.String fileName)
fileName - the source file.public static void main(java.lang.String[] args)