sjg.xml
Class Document

java.lang.Object
  extended by sjg.xml.Document

public class Document
extends java.lang.Object

Represents an XML-document. You will want to access the root element via the getRoot() method.


Constructor Summary
Document(Element root)
          Constructs a new document with the given element as root and default header.
Document(java.lang.String header, Element root)
          Constructs a new document with given header and document root.
 
Method Summary
 java.lang.String getHeader()
          Returns the header of the document in unparsed textual form.
 Element getRoot()
          Return the document root.
 java.lang.String toString()
          Returns the textual representation of this document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Document

public Document(java.lang.String header,
                Element root)
Constructs a new document with given header and document root.


Document

public Document(Element root)
Constructs a new document with the given element as root and default header.

Method Detail

getRoot

public Element getRoot()
Return the document root.


getHeader

public java.lang.String getHeader()
Returns the header of the document in unparsed textual form.


toString

public java.lang.String toString()
Returns the textual representation of this document.

Overrides:
toString in class java.lang.Object