org.exolab.adaptx.xml.parser

Class XercesParser

public class XercesParser extends Object implements DOMParser

Creates a DOM Package for use with Apache's Xerces parser.

Version: $Revision: 3633 $ $Date: 2003-03-01 02:38:44 -0500 (Sat, 01 Mar 2003) $

Author: Keith Visco

Constructor Summary
XercesParser()
Instantiate parser
Method Summary
DOMParsercopyInstance()
Creates a new copy of this DOMParser initialized with the same properties as this DOMParser.
DocumentcreateDocument()
Creates a DOM Document
DocumentreadDocument(URILocation location, ErrorObserver observer)
Reads an XML Document from the given Reader
voidsetDocumentType(Document document, String systemId)
Creates a DOM DocumentType using the DOM package of this DOMReader
voidsetValidation(boolean validate)
Sets whether or not to Validate the Document

Constructor Detail

XercesParser

public XercesParser()
Instantiate parser

Method Detail

copyInstance

public DOMParser copyInstance()
Creates a new copy of this DOMParser initialized with the same properties as this DOMParser.

Returns: the new DOMParser instance

createDocument

public Document createDocument()
Creates a DOM Document

Returns: the new Document

readDocument

public Document readDocument(URILocation location, ErrorObserver observer)
Reads an XML Document from the given Reader

Parameters: reader the Reader for reading the XML stream filename observer the ErrorObserver for notification of errors

setDocumentType

public void setDocumentType(Document document, String systemId)
Creates a DOM DocumentType using the DOM package of this DOMReader

Returns: the new DocumentType

setValidation

public void setValidation(boolean validate)
Sets whether or not to Validate the Document

Parameters: validate a boolean indicating whether or not to validate the Document