org.apache.excalibur.xml.impl
Class JaxpParser

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.excalibur.xml.impl.JaxpParser
All Implemented Interfaces:
Component, Disposable, DOMParser, ErrorHandler, LogEnabled, Parameterizable, org.apache.avalon.excalibur.pool.Poolable, SAXParser, Serviceable

public final class JaxpParser
extends AbstractLogEnabled
implements SAXParser, DOMParser, org.apache.avalon.excalibur.pool.Poolable, Component, Parameterizable, Serviceable, Disposable, ErrorHandler

An XMLParser that is only dependant on JAXP 1.1 compliant parsers. The configuration can contain the following parameters :

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

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
JaxpParser()
           
 
Method Summary
 Document createDocument()
          Return a new Document.
 void dispose()
           
 void error(SAXParseException spe)
          Receive notification of a recoverable error.
 void fatalError(SAXParseException spe)
          Receive notification of a fatal error.
 void parameterize(Parameters params)
           
 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 consumer.
 Document parseDocument(InputSource input)
          Parses a new Document object from the given InputSource.
 void service(ServiceManager manager)
          Get the Entity Resolver from the component m_manager
 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

JaxpParser

public JaxpParser()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Get the Entity Resolver from the component m_manager

Specified by:
service in interface Serviceable
ServiceException
Requires component:
type="EntityResolver" optional="true"

dispose

public void dispose()
Specified by:
dispose in interface Disposable

parameterize

public void parameterize(Parameters params)
                  throws ParameterException
Specified by:
parameterize in interface Parameterizable
ParameterException

parse

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

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.