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
-
ProjectXParser()
- Constructor: initialize parser
-
createDocument()
- Creates a new XML Document for use with the Project X parser
-
error(SAXParseException)
- Handle Errors
-
fatalError(SAXParseException)
- Handle Fatal Errors
-
readDocument(Reader, String, PrintWriter)
- Reads an XML Document from the given Reader
-
setDocumentType(Document, String)
- Sets the DocumentType for the given Document.
-
setValidation(boolean)
- Turns the validation on/off for this DOMPackage
-
warning(SAXParseException)
- Handle Warnings
ProjectXParser
public ProjectXParser()
- Constructor: initialize parser
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
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
createDocument
public Document createDocument()
- Creates a new XML Document for use with the Project X parser
- Returns:
- the new XML Document
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
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
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
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