Package org.apache.stylebook.parsers
Class XercesParser
- java.lang.Object
-
- org.apache.stylebook.AbstractComponent
-
- org.apache.stylebook.parsers.AbstractParser
-
- org.apache.stylebook.parsers.XercesParser
-
public class XercesParser extends AbstractParser implements Parser, org.xml.sax.ErrorHandler
- Version:
- CVS $Revision: 313289 $ $Date: 2002-01-22 19:24:53 +0100 (Tue, 22 Jan 2002) $
- Author:
- Pierpaolo Fumagalli, Copyright 1999 © The Apache Software Foundation. All rights reserved.
-
-
Field Summary
-
Fields inherited from class org.apache.stylebook.AbstractComponent
engine, params
-
-
Constructor Summary
Constructors Constructor Description XercesParser()
Instantiate a DocumentBuilderFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.Document
create()
Create a new empty DOM Document object.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.org.w3c.dom.Document
parse(org.xml.sax.InputSource in)
Parse the specified InputSource.void
warning(org.xml.sax.SAXParseException e)
Receive notification of a warning.-
Methods inherited from class org.apache.stylebook.parsers.AbstractParser
parse
-
Methods inherited from class org.apache.stylebook.AbstractComponent
debug, init, log
-
-
-
-
Method Detail
-
parse
public org.w3c.dom.Document parse(org.xml.sax.InputSource in) throws java.io.IOException, CreationException
Parse the specified InputSource.- Specified by:
parse
in interfaceParser
- Parameters:
in
- The InputSource to parse.- Returns:
- A non-null DOM Document object.
- Throws:
java.io.IOException
- If an I/O error occourred accessing the specified System-ID.CreationException
- If an error occourred parsing the document.
-
create
public org.w3c.dom.Document create()
Create a new empty DOM Document object.
-
error
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
Receive notification of a recoverable error.- Specified by:
error
in interfaceorg.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 interfaceorg.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 interfaceorg.xml.sax.ErrorHandler
- Parameters:
e
- The Exception thrown during parsing.- Throws:
org.xml.sax.SAXException
- The Exception notifying the client.
-
-