org.openeai.xml
Class XmlDocumentReader


java.lang.Object

  |

  +--org.openeai.OpenEaiObject

        |

        +--org.openeai.xml.XmlDocumentReader


public class XmlDocumentReader
extends OpenEaiObject

This class is used to create a JDOM Document object from the contents of an XML file that can be stored in a file (on a web server or local file system) or passed in as an in-memory representation of that file (Reader, InputStream).

Version:
3.0 beta2 - 28 January 2003
Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)

Field Summary
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
XmlDocumentReader()
          Constructor
 
Method Summary
 org.jdom.Document initializeDocument(java.io.InputStream is, boolean validate)
          Creates a JDOM Document from the supplied InputStream.
 org.jdom.Document initializeDocument(java.io.Reader docAsReader, boolean validate)
          Creates a JDOM Document from the supplied Reader.
 org.jdom.Document initializeDocument(java.lang.String fileName, boolean validate)
          Creates a JDOM Document from the specified XML file name.
 
Methods inherited from class org.openeai.OpenEaiObject
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDocumentReader


public XmlDocumentReader()
Constructor

Method Detail

initializeDocument


public final org.jdom.Document initializeDocument(java.lang.String fileName,
                                                  boolean validate)
                                           throws XmlDocumentReaderException
Creates a JDOM Document from the specified XML file name.

Example 1: http://www.somexmlserver.com/xml/AnXmlFile.xml

Example 2: file://localhost/xmlfiles/AnXmlFile.xml

Example 3: c:\xmlfiles\AnXmlFile.xml

Example 4: /opt/xmlfiles/AnXmlFile.xml

Returns:
org.jdom.Document
XmlDocumentReaderException

initializeDocument


public final org.jdom.Document initializeDocument(java.io.InputStream is,
                                                  boolean validate)
                                           throws XmlDocumentReaderException
Creates a JDOM Document from the supplied InputStream.

Returns:
org.jdom.Document
XmlDocumentReaderException

initializeDocument


public final org.jdom.Document initializeDocument(java.io.Reader docAsReader,
                                                  boolean validate)
                                           throws XmlDocumentReaderException
Creates a JDOM Document from the supplied Reader.

Returns:
org.jdom.Document
XmlDocumentReaderException


Copyright © 2002, OpenEAI Software Foundation