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.
-
dtd
- The document's Document Type Declaration.
-
root
- The document's root element.
-
version
- The XML version being encoded.
-
Document()
- Constructs a new Document with no root element and no DTD.
-
Document(Element)
- Constructs a new Document with no DTD.
-
Document(Element, DocumentTypeDefinition)
- Constructs a new Document.
-
getDTD()
- Get the DocumentTypeDefinition.
-
getRootElement()
- Get the root Element.
-
setDTD(DocumentTypeDefinition)
- Sets the DTD.
-
setRootElement(Element)
- Set the root Element.
-
toString()
- Get the Document in String form.
-
toString(MarkupReader, int)
-
version
protected String version
- The XML version being encoded.
dtd
protected DocumentTypeDefinition dtd
- The document's Document Type Declaration.
root
protected Element root
- The document's root element.
Document
public Document()
- Constructs a new Document with no root element and no DTD.
Document
public Document(Element root)
- Constructs a new Document with no DTD.
- Parameters:
- root - the root Element.
Document
public Document(Element root,
DocumentTypeDefinition dtd)
- Constructs a new Document.
- Parameters:
- root - the root Element.
- dtd - the DocumentTypeDefinition.
getDTD
public DocumentTypeDefinition getDTD()
- Get the DocumentTypeDefinition.
- Returns:
- The DTD.
setDTD
public void setDTD(DocumentTypeDefinition dtd)
- Sets the DTD.
- Parameters:
- dtd - the DTD.
getRootElement
public Element getRootElement()
- Get the root Element.
- Returns:
- The root Element.
setRootElement
public void setRootElement(Element root)
- Set the root Element.
- Parameters:
- root - Value to assign to root.
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
toString
public boolean toString(MarkupReader reader,
int depth)
All Packages Class Hierarchy This Package Previous Next Index