All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vnet.markup.Document

java.lang.Object
   |
   +----vnet.markup.Document

public class Document
extends Object
implements MarkupObject
A generic XML document. A Document contans the root element and other valid entities such as a DTD.

Note: vnet.markup classes are not thread safe. Locking must be performed by the application.


Variable Index

 o dtd
The document's Document Type Declaration.
 o root
The document's root element.
 o version
The XML version being encoded.

Constructor Index

 o Document()
Constructs a new Document with no root element and no DTD.
 o Document(Element)
Constructs a new Document with no DTD.
 o Document(Element, DocumentTypeDefinition)
Constructs a new Document.

Method Index

 o getDTD()
Get the DocumentTypeDefinition.
 o getRootElement()
Get the root Element.
 o setDTD(DocumentTypeDefinition)
Sets the DTD.
 o setRootElement(Element)
Set the root Element.
 o toString()
Get the Document in String form.
 o toString(MarkupReader, int)

Variables

 o version
 protected String version
The XML version being encoded.

 o dtd
 protected DocumentTypeDefinition dtd
The document's Document Type Declaration.

 o root
 protected Element root
The document's root element.

Constructors

 o Document
 public Document()
Constructs a new Document with no root element and no DTD.

 o Document
 public Document(Element root)
Constructs a new Document with no DTD.

Parameters:
root - the root Element.
 o Document
 public Document(Element root,
                 DocumentTypeDefinition dtd)
Constructs a new Document.

Parameters:
root - the root Element.
dtd - the DocumentTypeDefinition.

Methods

 o getDTD
 public DocumentTypeDefinition getDTD()
Get the DocumentTypeDefinition.

Returns:
The DTD.
 o setDTD
 public void setDTD(DocumentTypeDefinition dtd)
Sets the DTD.

Parameters:
dtd - the DTD.
 o getRootElement
 public Element getRootElement()
Get the root Element.

Returns:
The root Element.
 o setRootElement
 public void setRootElement(Element root)
Set the root Element.

Parameters:
root - Value to assign to root.
 o toString
 public String toString()
Get the Document in String form. The root Element and it's children are not included on the representation.

Returns:
a String representation of the Document.
Overrides:
toString in class Object
 o toString
 public boolean toString(MarkupReader reader,
                         int depth)

All Packages  Class Hierarchy  This Package  Previous  Next  Index