xrel.xml
Class Xerces

java.lang.Object
  |
  +--xrel.xml.Xerces
All Implemented Interfaces:
org.xml.sax.ErrorHandler, ParserWrapper, ParserWrapper.DocumentInfo

public class Xerces
extends java.lang.Object
implements ParserWrapper, ParserWrapper.DocumentInfo, org.xml.sax.ErrorHandler

Wraps the Xerces DOM parser.

Version:
$Id: Xerces.java,v 1.2 2001/08/23 00:35:17 lehors Exp $

Inner classes inherited from class xrel.xml.ParserWrapper
ParserWrapper.DocumentInfo
 
Field Summary
protected  org.apache.xerces.parsers.DOMParser parser
          Parser.
 
Constructor Summary
Xerces()
          Default constructor.
 
Method Summary
 void error(org.xml.sax.SAXParseException ex)
          Error.
 void fatalError(org.xml.sax.SAXParseException ex)
          Fatal error.
 ParserWrapper.DocumentInfo getDocumentInfo()
          Returns the document information.
 boolean isIgnorableWhitespace(org.w3c.dom.Text text)
          Returns true if the specified text node is ignorable whitespace.
 org.w3c.dom.Document parse(java.lang.String uri)
          Parses the specified URI and returns the document.
protected  void printError(java.lang.String type, org.xml.sax.SAXParseException ex)
          Prints the error message.
 void setFeature(java.lang.String featureId, boolean state)
          Sets a feature.
 void warning(org.xml.sax.SAXParseException ex)
          Warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

protected org.apache.xerces.parsers.DOMParser parser
Parser.
Constructor Detail

Xerces

public Xerces()
Default constructor.
Method Detail

parse

public org.w3c.dom.Document parse(java.lang.String uri)
                           throws java.lang.Exception
Parses the specified URI and returns the document.
Specified by:
parse in interface ParserWrapper

setFeature

public void setFeature(java.lang.String featureId,
                       boolean state)
                throws org.xml.sax.SAXNotRecognizedException,
                       org.xml.sax.SAXNotSupportedException
Sets a feature.
Specified by:
setFeature in interface ParserWrapper
Following copied from interface: xrel.xml.ParserWrapper
Parameters:
featureId - The unique identifier (URI) of the feature.
state - The requested state of the feature (true or false).
Throws:
org.xml.sax.SAXNotRecognizedException - If the requested feature is not known.
org.xml.sax.SAXNotSupportedException - If the requested feature is known, but the requested state is not supported.

getDocumentInfo

public ParserWrapper.DocumentInfo getDocumentInfo()
Returns the document information.
Specified by:
getDocumentInfo in interface ParserWrapper

isIgnorableWhitespace

public boolean isIgnorableWhitespace(org.w3c.dom.Text text)
Returns true if the specified text node is ignorable whitespace.
Specified by:
isIgnorableWhitespace in interface ParserWrapper.DocumentInfo

warning

public void warning(org.xml.sax.SAXParseException ex)
             throws org.xml.sax.SAXException
Warning.
Specified by:
warning in interface org.xml.sax.ErrorHandler

error

public void error(org.xml.sax.SAXParseException ex)
           throws org.xml.sax.SAXException
Error.
Specified by:
error in interface org.xml.sax.ErrorHandler

fatalError

public void fatalError(org.xml.sax.SAXParseException ex)
                throws org.xml.sax.SAXException
Fatal error.
Specified by:
fatalError in interface org.xml.sax.ErrorHandler

printError

protected void printError(java.lang.String type,
                          org.xml.sax.SAXParseException ex)
Prints the error message.