org.jmx4odp.j4oNet
Class XmlDataLoader

java.lang.Object
  extended by org.jmx4odp.j4oNet.XmlDataLoader
All Implemented Interfaces:
java.io.Serializable

public class XmlDataLoader
extends java.lang.Object
implements java.io.Serializable

This object acts as a wrapper to a DOM parser. It has convient methods for creating and loading a stream from a URL, file, etc. Using the DOM parser this object will return a Document object based upon the source.

Author:
Lucas McGregor
See Also:
Serialized Form

Field Summary
static boolean VERBOSE
           
 
Constructor Summary
XmlDataLoader()
           
 
Method Summary
 org.w3c.dom.Document getDocument(java.io.File file)
          Will return an XML document object for a XML file.
 org.w3c.dom.Document getDocument(java.io.InputStream ins)
          Will return an XML document object for a XML file read from the InputStream.
 org.w3c.dom.Document getDocument(java.lang.String urlString)
          Give the URL complient String for an XML document's location, this will return an Document object
 org.w3c.dom.Document getDocument(java.net.URL url)
          Will return an XML document object for a XML file found at the URL's location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

public static final boolean VERBOSE
See Also:
Constant Field Values
Constructor Detail

XmlDataLoader

public XmlDataLoader()
Method Detail

getDocument

public org.w3c.dom.Document getDocument(java.lang.String urlString)
                                 throws org.xml.sax.SAXException,
                                        java.io.IOException,
                                        java.net.MalformedURLException
Give the URL complient String for an XML document's location, this will return an Document object

Throws:
org.xml.sax.SAXException
java.io.IOException
java.net.MalformedURLException

getDocument

public org.w3c.dom.Document getDocument(java.net.URL url)
                                 throws org.xml.sax.SAXException,
                                        java.io.IOException
Will return an XML document object for a XML file found at the URL's location.

Throws:
org.xml.sax.SAXException
java.io.IOException

getDocument

public org.w3c.dom.Document getDocument(java.io.File file)
                                 throws org.xml.sax.SAXException,
                                        java.io.IOException
Will return an XML document object for a XML file.

Throws:
org.xml.sax.SAXException
java.io.IOException

getDocument

public org.w3c.dom.Document getDocument(java.io.InputStream ins)
                                 throws org.xml.sax.SAXException,
                                        java.io.IOException
Will return an XML document object for a XML file read from the InputStream.

Throws:
org.xml.sax.SAXException
java.io.IOException