org.apache.excalibur.xml.impl
Class XercesParser

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.excalibur.xml.impl.XercesParser
All Implemented Interfaces:
DOMParser, ErrorHandler, Initializable, LogEnabled, SAXParser, ThreadSafe

public final class XercesParser
extends AbstractLogEnabled
implements SAXParser, DOMParser, ErrorHandler, ThreadSafe, Initializable

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
 Document createDocument()
          Return a new Document.
 void error(SAXParseException spe)
          Receive notification of a recoverable error.
 void fatalError(SAXParseException spe)
          Receive notification of a fatal error.
 void initialize()
           
 void parse(InputSource in, ContentHandler consumer)
          Parse the InputSource and send SAX events to the consumer.
 void parse(InputSource in, ContentHandler contentHandler, LexicalHandler lexicalHandler)
          Parse the InputSource and send SAX events to the content handler and the lexical handler.
 Document parseDocument(InputSource input)
          Parses a new Document object from the given InputSource.
 void warning(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 Exception
Specified by:
initialize in interface Initializable
Exception

parse

public void parse(InputSource in,
                  ContentHandler consumer)
           throws SAXException,
                  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
SAXException
IOException

parse

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

Specified by:
parse in interface SAXParser
SAXException
IOException

parseDocument

public Document parseDocument(InputSource input)
                       throws SAXException,
                              IOException
Parses a new Document object from the given InputSource.

Specified by:
parseDocument in interface DOMParser
SAXException
IOException

createDocument

public Document createDocument()
                        throws SAXException
Return a new Document.

Specified by:
createDocument in interface DOMParser
SAXException

error

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

Specified by:
error in interface ErrorHandler
SAXException

fatalError

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

Specified by:
fatalError in interface ErrorHandler
SAXException

warning

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

Specified by:
warning in interface ErrorHandler
SAXException


Copyright © 1997-2004 The Apache Software Foundation. All Rights Reserved.