SienaXML (v.2.0.0) API documentation

siena.xml
Class DOMParserWrapper

java.lang.Object
  extended by siena.xml.DOMParserWrapper
All Implemented Interfaces:
org.xml.sax.ErrorHandler

public class DOMParserWrapper
extends java.lang.Object
implements org.xml.sax.ErrorHandler

This class is used to wrap the ugly details of parsing a XML document from the users. It handles any type of error conditions while parsing the xml document and deals with them accordenly. This may mean throwing an exception or returning with a null return value. Upon finishing parsing it will return a W3C Document that contains the DOM.

Since:
11-05-2001
See Also:
ErrorHandler

Constructor Summary
DOMParserWrapper()
          This is the constructor for the parser.
 
Method Summary
 void error(org.xml.sax.SAXParseException exception)
           
 void fatalError(org.xml.sax.SAXParseException exception)
           
 org.w3c.dom.Document parse(org.xml.sax.InputSource inputSource)
          This method will parse the given XML document that is in the InputSource wrapper.
 org.w3c.dom.Document parse(java.lang.String xmlString)
          This method parses the XML passed in as the string and returns the DOM Document.
 void warning(org.xml.sax.SAXParseException exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMParserWrapper

public DOMParserWrapper()
This is the constructor for the parser.

Since:
11-20-01
Method Detail

parse

public org.w3c.dom.Document parse(java.lang.String xmlString)
This method parses the XML passed in as the string and returns the DOM Document.

Parameters:
xmlString - The string containing the XML
Returns:
W3C DOM Document for the XML
Since:
11-05-2001
See Also:
org.apache.xerces.parsers.DOMParser

parse

public org.w3c.dom.Document parse(org.xml.sax.InputSource inputSource)
                           throws org.xml.sax.SAXException
This method will parse the given XML document that is in the InputSource wrapper.

Parameters:
inputSource - InputSource object that contains the XML document.
Returns:
W3C Document for the DOM.
Throws:
org.xml.sax.SAXException - Thrown when the XML string parsed contains a syntax error.

error

public void error(org.xml.sax.SAXParseException exception)
           throws org.xml.sax.SAXException
Specified by:
error in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

warning

public void warning(org.xml.sax.SAXParseException exception)
             throws org.xml.sax.SAXException
Specified by:
warning in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

fatalError

public void fatalError(org.xml.sax.SAXParseException exception)
                throws org.xml.sax.SAXException
Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

SienaXML (v.2.0.0) API documentation

Copyright © 2000-2002 University of Colorado.
This documentation is maintained by Antonio Carzaniga