public abstract class Document
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Element |
rootElem
The root element of any parsed document
|
Constructor and Description |
---|
Document()
Create a new instance of DocumentImpl.
|
Modifier and Type | Method and Description |
---|---|
abstract Element |
getRootElement()
Get the root element of the document.
|
protected abstract void |
initialise()
Initialise some values.
|
abstract Element |
parse(java.io.InputStream xmlStream)
Parse the String-based xml stream and return the root element.
|
abstract Element |
parse(java.lang.String xmlStream)
Parse the String-based xml stream and return the root element.
|
abstract void |
setRootElement(Element theRootElement)
Set the root element value of the document.
|
protected Element rootElem
public Document() throws java.lang.Exception
java.lang.Exception
- any error.protected abstract void initialise() throws java.lang.Exception
java.lang.Exception
- any error.public abstract Element parse(java.lang.String xmlStream) throws java.lang.Exception
xmlStream
- the XML description in String format.java.lang.Exception
- any error.public abstract Element parse(java.io.InputStream xmlStream) throws java.lang.Exception
xmlStream
- the input stream, for example, a file.java.lang.Exception
- any error.public abstract void setRootElement(Element theRootElement)
theRootElement
- the root element.public abstract Element getRootElement()