org.apache.excalibur.xml.impl
Class XercesParser

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.excalibur.xml.impl.XercesParser
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.thread.ThreadSafe, DOMParser, SAXParser, org.xml.sax.ErrorHandler

public final class XercesParser
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements SAXParser, DOMParser, org.xml.sax.ErrorHandler, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.component.Component

Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:20 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.excalibur.xml.sax.SAXParser
ROLE
 
Fields inherited from interface org.apache.excalibur.xml.dom.DOMParser
ROLE
 
Constructor Summary
XercesParser()
           
 
Method Summary
 org.w3c.dom.Document createDocument()
          Return a new Document.
 void error(org.xml.sax.SAXParseException spe)
          Receive notification of a recoverable error.
 void fatalError(org.xml.sax.SAXParseException spe)
          Receive notification of a fatal error.
 void initialize()
           
 void parse(org.xml.sax.InputSource in, org.xml.sax.ContentHandler consumer)
          Parse the InputSource and send SAX events to the consumer.
 void parse(org.xml.sax.InputSource in, org.xml.sax.ContentHandler contentHandler, org.xml.sax.ext.LexicalHandler lexicalHandler)
          Parse the InputSource and send SAX events to the content handler and the lexical handler.
 org.w3c.dom.Document parseDocument(org.xml.sax.InputSource input)
          Parses a new Document object from the given InputSource.
 void warning(org.xml.sax.SAXParseException spe)
          Receive notification of a warning.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XercesParser

public XercesParser()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception

parse

public void parse(org.xml.sax.InputSource in,
                  org.xml.sax.ContentHandler consumer)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Description copied from interface: SAXParser
Parse the InputSource and send SAX events to the consumer. Attention: the consumer can implement the LexicalHandler as well. The parse should take care of this.

Specified by:
parse in interface SAXParser
Throws:
org.xml.sax.SAXException
java.io.IOException

parse

public void parse(org.xml.sax.InputSource in,
                  org.xml.sax.ContentHandler contentHandler,
                  org.xml.sax.ext.LexicalHandler lexicalHandler)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the InputSource and send SAX events to the content handler and the lexical handler.

Specified by:
parse in interface SAXParser
Throws:
org.xml.sax.SAXException
java.io.IOException

parseDocument

public org.w3c.dom.Document parseDocument(org.xml.sax.InputSource input)
                                   throws org.xml.sax.SAXException,
                                          java.io.IOException
Parses a new Document object from the given InputSource.

Specified by:
parseDocument in interface DOMParser
Throws:
org.xml.sax.SAXException
java.io.IOException

createDocument

public org.w3c.dom.Document createDocument()
                                    throws org.xml.sax.SAXException
Return a new Document.

Specified by:
createDocument in interface DOMParser
Throws:
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException spe)
           throws org.xml.sax.SAXException
Receive notification of a recoverable error.

Specified by:
error in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

fatalError

public void fatalError(org.xml.sax.SAXParseException spe)
                throws org.xml.sax.SAXException
Receive notification of a fatal error.

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

warning

public void warning(org.xml.sax.SAXParseException spe)
             throws org.xml.sax.SAXException
Receive notification of a warning.

Specified by:
warning in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException


Copyright © 1997-2009 Apache Software Foundation. All Rights Reserved.