Cocoon API: Class AbstractParser

org.apache.cocoon.parser
Class AbstractParser

java.lang.Object
  |
  +--org.apache.cocoon.parser.AbstractParser
All Implemented Interfaces:
Configurable, org.xml.sax.ErrorHandler, Parser
Direct Known Subclasses:
SunXMLParser, XercesParser

public abstract class AbstractParser
extends java.lang.Object
implements org.xml.sax.ErrorHandler, Parser, Configurable

This class implements all the common methods used by the XML parsers.

Version:
$Revision: 1.4 $ $Date: 2000/02/13 18:29:28 $
Author:
Stefano Mazzocchi

Field Summary
protected  boolean validation
           
 
Constructor Summary
AbstractParser()
           
 
Method Summary
 void error(org.xml.sax.SAXParseException e)
          Receive notification of a recoverable error.
 void fatalError(org.xml.sax.SAXParseException e)
          Receive notification of a non-recoverable error.
 void init(Configurations conf)
          Initialize the class by passing its configurations.
 org.w3c.dom.Document parse(org.xml.sax.InputSource input)
          Creates a DOM tree parsing the given input source and using the given entity resolver.
 void warning(org.xml.sax.SAXParseException e)
          Receive notification of a warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.parser.Parser
createEmptyDocument, parse
 

Field Detail

validation

protected boolean validation
Constructor Detail

AbstractParser

public AbstractParser()
Method Detail

init

public void init(Configurations conf)
Description copied from interface: Configurable
Initialize the class by passing its configurations.
Specified by:
init in interface Configurable

parse

public org.w3c.dom.Document parse(org.xml.sax.InputSource input)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Creates a DOM tree parsing the given input source and using the given entity resolver.
Specified by:
parse in interface Parser

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
Receive notification of a recoverable error.
Specified by:
error in interface org.xml.sax.ErrorHandler
Parameters:
e - The Exception thrown during parsing.
Throws:
org.xml.sax.SAXException - The Exception notifying the client.

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXException
Receive notification of a non-recoverable error.
Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Parameters:
e - The Exception thrown during parsing.
Throws:
org.xml.sax.SAXException - The Exception notifying the client.

warning

public void warning(org.xml.sax.SAXParseException e)
             throws org.xml.sax.SAXException
Receive notification of a warning.
Specified by:
warning in interface org.xml.sax.ErrorHandler
Parameters:
e - The Exception thrown during parsing.
Throws:
org.xml.sax.SAXException - The Exception notifying the client.


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.