FreeHEP API
Version v1.1

org.freehep.xml.util
Class DOMParser

java.lang.Object
  |
  +--org.freehep.xml.util.DOMParser
Direct Known Subclasses:
XercesDOMParser

Deprecated. Use JAXP instead .. will be removed from future FreeHEP releases

public abstract class DOMParser
extends Object

Ideally wouldn't need this interface, except that the DOM specification only specifies how to extract information from a DOM, not how to create a DOM from an XML file. The JASDOMParser interface is meant to make up for that deficiency.

Version:
$Id: DOMParser.java,v 1.4 2001/02/16 00:46:23 tonyj Exp $
Author:
Tony Johnson (tonyj@slac.stanford.edu)

Nested Class Summary
static class DOMParser.XMLException
          Deprecated. An exception that gets thrown if there is an error reading an XML file.
 
Constructor Summary
DOMParser()
          Deprecated.  
 
Method Summary
static DOMParser instance()
          Deprecated. Creates a default instance of a JASDOMParser
abstract  org.w3c.dom.Document parse(Reader in, String fileName)
          Deprecated. Create a DOM document by reading an XML file
abstract  org.w3c.dom.Document parse(Reader in, String fileName, org.xml.sax.EntityResolver resolver)
          Deprecated. Create a DOM document by reading an XML file with an explicit entity resolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMParser

public DOMParser()
Deprecated. 
Method Detail

parse

public abstract org.w3c.dom.Document parse(Reader in,
                                           String fileName)
                                    throws DOMParser.XMLException
Deprecated. 
Create a DOM document by reading an XML file

Parameters:
in - A reader set up to read an XML file
fileName - The name of the file being read (used in error messages)
Returns:
Document The resulting DOM
Throws:
DOMParser.XMLException - thrown if there is an error reading the XML

parse

public abstract org.w3c.dom.Document parse(Reader in,
                                           String fileName,
                                           org.xml.sax.EntityResolver resolver)
                                    throws DOMParser.XMLException
Deprecated. 
Create a DOM document by reading an XML file with an explicit entity resolver. An entity resolver is typically used to specify where to find the DTD for the XML document.

Parameters:
in - A reader set up to read an XML file
fileName - The name of the file being read (used in error messages)
resolver - An entity resolver to use when reading the XML file
Returns:
Document The resulting DOM
Throws:
DOMParser.XMLException - thrown if there is an error reading the XML

instance

public static DOMParser instance()
Deprecated. 
Creates a default instance of a JASDOMParser

Returns:
A DOMParser

FreeHEP API
Version v1.1

Copyright © 2000-2002 FreeHEP, All Rights Reserved.