All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xslp.xml.parsers.ProjectXParser

xslp.xml.parsers.ProjectXParser

public class ProjectXParser
implements DOMPackage
A DOMPackage Wrapper for Sun's Project X XML parser

Author:
Olivier Brand, Michel Casabianca

Constructor Index

 o ProjectXParser()
Constructor: initialize parser

Method Index

 o createDocument()
Creates a new XML Document for use with the Project X parser
 o error(SAXParseException)
Handle Errors
 o fatalError(SAXParseException)
Handle Fatal Errors
 o readDocument(Reader, String, PrintWriter)
Reads an XML Document from the given Reader
 o setDocumentType(Document, String)
Sets the DocumentType for the given Document.
 o setValidation(boolean)
Turns the validation on/off for this DOMPackage
 o warning(SAXParseException)
Handle Warnings

Constructors

 o ProjectXParser
 public ProjectXParser()
Constructor: initialize parser

Methods

 o setDocumentType
 public void setDocumentType(Document document,
                             String systemId)
Sets the DocumentType for the given Document.

Parameters:
document - an instanceof com.sun.xml.tree.XmlDocument
systemId - the System ID for the DOCTYPE Declaration
 o setValidation
 public void setValidation(boolean validate)
Turns the validation on/off for this DOMPackage

Parameters:
validate - the boolean to determine whether or not to validate Documents
 o createDocument
 public Document createDocument()
Creates a new XML Document for use with the Project X parser

Returns:
the new XML Document
 o readDocument
 public Document readDocument(Reader reader,
                              String filename,
                              PrintWriter errorWriter)
Reads an XML Document from the given Reader

Parameters:
reader - the Reader for reading the XML Document stream.
filename - the filename used when reporting errors.
errorWriter - the PrintWriter used to print error messages to.
Returns:
the XML Document
 o warning
 public void warning(SAXParseException e) throws SAXException
Handle Warnings

Parameters:
exception - exception thrown by the SAX parser
Throws: exception
to throw to stop parsing
 o error
 public void error(SAXParseException e) throws SAXException
Handle Errors

Parameters:
exception - exception thrown by the SAX parser
Throws: exception
to throw to stop parsing
 o fatalError
 public void fatalError(SAXParseException e) throws SAXException
Handle Fatal Errors

Parameters:
exception - exception thrown by the SAX parser
Throws: exception
to throw to stop parsing

All Packages  Class Hierarchy  This Package  Previous  Next  Index