|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ibisph.dao.xml.Document
public class Document
XML document Helper. Used to load, save, format XML Documents and Elements.
| Field Summary | |
|---|---|
protected org.dom4j.io.OutputFormat |
outputFormat
|
| Constructor Summary | |
|---|---|
Document()
|
|
Document(org.dom4j.io.OutputFormat outputFormat)
|
|
| Method Summary | |
|---|---|
org.dom4j.Document |
get(java.io.File xmlFile)
Creates a new XML document and loads the document with the specified file's contents. |
org.dom4j.Document |
get(java.lang.String filename)
|
boolean |
load(java.io.File xmlFile,
org.dom4j.Document document)
Loads the specified XML file into the document. |
boolean |
load(java.lang.String filename,
org.dom4j.Document document)
Loads the specified XML file into the document. |
void |
save(org.dom4j.Document document,
java.io.File file)
|
void |
save(org.dom4j.Document document,
java.io.File file,
org.dom4j.io.OutputFormat outputFormat)
|
void |
save(org.dom4j.Document document,
java.io.OutputStream outputStream,
org.dom4j.io.OutputFormat outputFormat)
Core save method - sends the XML document to the specified output stream. |
void |
save(org.dom4j.Document document,
java.lang.String completePathAndFilename)
|
void |
save(org.dom4j.Document document,
java.lang.String completePathAndFilename,
org.dom4j.io.OutputFormat outputFormat)
|
void |
setOutputFormat(org.dom4j.io.OutputFormat outputFormat)
Sets output format. |
java.lang.String |
streamToURL(org.dom4j.Document document,
java.lang.String urlToSendTo)
Sends the XML document to the specified URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.dom4j.io.OutputFormat outputFormat
| Constructor Detail |
|---|
public Document()
public Document(org.dom4j.io.OutputFormat outputFormat)
| Method Detail |
|---|
public void setOutputFormat(org.dom4j.io.OutputFormat outputFormat)
outputFormat - String which contains the output format to be used
when saving the document to a text file.
public org.dom4j.Document get(java.io.File xmlFile)
throws org.dom4j.DocumentException
xmlFile - Source XML file.
null if file does not exist.
org.dom4j.DocumentException - XML parsing/file problems when loading file.
public org.dom4j.Document get(java.lang.String filename)
throws org.dom4j.DocumentException
org.dom4j.DocumentException
public boolean load(java.io.File xmlFile,
org.dom4j.Document document)
throws org.dom4j.DocumentException
xmlFile - Source file to be read and parsed into the document.document - Destination document
true if file was successfully loaded into the
document, false if file does not exist.
org.dom4j.DocumentException - XML parsing/file problems when loading file.
public boolean load(java.lang.String filename,
org.dom4j.Document document)
throws org.dom4j.DocumentException
filename - Source filename to be read and parsed into the document.document - Destination document
true if file was successfully loaded into the
document, false if file does not exist.
org.dom4j.DocumentException - XML parsing/file problems when loading file.
public void save(org.dom4j.Document document,
java.io.OutputStream outputStream,
org.dom4j.io.OutputFormat outputFormat)
throws java.io.IOException
document - Source - document to be streamed out.outputStream - Destination stream where document's contents are to
be sent.outputFormat - Specifies how to format the XML. If null
then the pretty printer will be used. If the output
format property is specified for this then the encoding
specified will be used so that all documents created will use the
same encoding.
java.io.IOException - Related to file output operations.
public void save(org.dom4j.Document document,
java.lang.String completePathAndFilename,
org.dom4j.io.OutputFormat outputFormat)
throws java.io.IOException
java.io.IOException
public void save(org.dom4j.Document document,
java.lang.String completePathAndFilename)
throws java.io.IOException
java.io.IOException
public void save(org.dom4j.Document document,
java.io.File file,
org.dom4j.io.OutputFormat outputFormat)
throws java.io.IOException
java.io.IOException
public void save(org.dom4j.Document document,
java.io.File file)
throws java.io.IOException
java.io.IOException
public java.lang.String streamToURL(org.dom4j.Document document,
java.lang.String urlToSendTo)
throws java.io.IOException,
java.net.MalformedURLException
document - Document to be streamed out.urlToSendTo - Destination URL where the document will be posted.
java.io.IOException - Related to stream operations.
java.net.MalformedURLException - URL related issues.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||