com.linkwerk.util
Class DOM

java.lang.Object
  extended by com.linkwerk.util.DOM

public abstract class DOM
extends java.lang.Object

DOM Helper class with static methods for creation of DOM Documents.

Version:
1.0
Author:
Christoph Leisegang

Constructor Summary
DOM()
           
 
Method Summary
static org.w3c.dom.Document createDocument()
          Obtain a new instance of a DOM Document object to build a DOM tree with.
static org.w3c.dom.Document parse(java.io.InputStream input)
          Parse the content of the given input source as an XML document and return a new DOM Document object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOM

public DOM()
Method Detail

createDocument

public static org.w3c.dom.Document createDocument()
Obtain a new instance of a DOM Document object to build a DOM tree with.

Returns:
A new instance of a DOM Document object.

parse

public static org.w3c.dom.Document parse(java.io.InputStream input)
                                  throws org.xml.sax.SAXException,
                                         java.io.IOException
Parse the content of the given input source as an XML document and return a new DOM Document object.

Parameters:
input - InputStream containing the content to be parsed.
Returns:
A new DOM Document object.
Throws:
org.xml.sax.SAXException - If any parse errors occur.
java.io.IOException - If any IO errors occur.