org.exolab.adaptx.xml.parser
Class XercesParser

java.lang.Object
  extended by org.exolab.adaptx.xml.parser.XercesParser
All Implemented Interfaces:
DOMParser

public class XercesParser
extends java.lang.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
 DOMParser copyInstance()
          Creates a new copy of this DOMParser initialized with the same properties as this DOMParser.
 org.w3c.dom.Document createDocument()
          Creates a DOM Document
 org.w3c.dom.Document readDocument(URILocation location, ErrorObserver observer)
          Reads an XML Document from the given Reader
 void setDocumentType(org.w3c.dom.Document document, java.lang.String systemId)
          Creates a DOM DocumentType using the DOM package of this DOMReader
 void setValidation(boolean validate)
          Sets whether or not to Validate the Document
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

Specified by:
copyInstance in interface DOMParser
Returns:
the new DOMParser instance

setDocumentType

public void setDocumentType(org.w3c.dom.Document document,
                            java.lang.String systemId)
Creates a DOM DocumentType using the DOM package of this DOMReader

Specified by:
setDocumentType in interface DOMParser

setValidation

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

Specified by:
setValidation in interface DOMParser
Parameters:
validate - a boolean indicating whether or not to validate the Document

createDocument

public org.w3c.dom.Document createDocument()
Creates a DOM Document

Specified by:
createDocument in interface DOMParser
Returns:
the new Document

readDocument

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

Specified by:
readDocument in interface DOMParser
Parameters:
reader - the Reader for reading the XML stream
filename -
observer - the ErrorObserver for notification of errors