org.dbforms.interfaces
Interface IDOMFactory

All Known Implementing Classes:
AbstractDOMFactoryImpl, DOMFactoryXALANImpl

public interface IDOMFactory

abstract class to hide the implemtation details of the various dom implementations.

Author:
Henner Kollmann

Method Summary
 String DOM2String(Document doc)
          Creates a string representation of the given DOMDocument
 Document newDOMDocument()
          Creates a new empty DOMDocument
 org.w3c.dom.xpath.XPathEvaluator newXPathEvaluator()
          returns an new created XPathEvaluator
 Document read(InputStream in)
          Reads a DOMDocument from given InputStream
 Document read(String url)
          Reads a DOMDocument from given url
 Document String2DOM(String data)
          Creates an new DOMDocument from the given string
 void write(OutputStream out, Document doc)
          Writes a DOMDocument into an OutputStream
 void write(OutputStream out, Element root)
          Writes a DOMElement into an OutputStream
 void write(String url, Document doc)
          Writes an DOMDocument into a file
 void write(String url, Element root)
          Writes an DOMElement into a file
 

Method Detail

DOM2String

String DOM2String(Document doc)
Creates a string representation of the given DOMDocument

Parameters:
doc - The document to transform
Returns:
string representation

String2DOM

Document String2DOM(String data)
Creates an new DOMDocument from the given string

Parameters:
data - the string to parse
Returns:
The new DOMDocument

newDOMDocument

Document newDOMDocument()
Creates a new empty DOMDocument

Returns:
An empty DOMDocument

read

Document read(InputStream in)
Reads a DOMDocument from given InputStream

Parameters:
in - The InputStream to read
Returns:
The new parsed DOMDocument

read

Document read(String url)
Reads a DOMDocument from given url

Parameters:
url - the url to read from
Returns:
The new parsed DOMDocument

write

void write(OutputStream out,
           Element root)
           throws IOException
Writes a DOMElement into an OutputStream

Parameters:
out - OutputStream to write into
root - root element to start writing
Throws:
IOException

write

void write(OutputStream out,
           Document doc)
           throws IOException
Writes a DOMDocument into an OutputStream

Parameters:
out - OutputStream to write into
doc - doc to write
Throws:
IOException

write

void write(String url,
           Document doc)
           throws IOException
Writes an DOMDocument into a file

Parameters:
url - The url to write to
doc - The document to write
Throws:
IOException

write

void write(String url,
           Element root)
           throws IOException
Writes an DOMElement into a file

Parameters:
url - The url to write to
root - root element to start writing
Throws:
IOException

newXPathEvaluator

org.w3c.dom.xpath.XPathEvaluator newXPathEvaluator()
returns an new created XPathEvaluator

Returns:
the new XPathEvaluator


Copyright © 2002-2006 DbForms. All Rights Reserved.