org.umber.bellows.loader
Class SAXLoader

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byorg.umber.bellows.loader.SAXLoader
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ext.DeclHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler

public class SAXLoader
extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ext.LexicalHandler, org.xml.sax.ext.DeclHandler

Generic loader for arbitrary XML formats. Creates a Datum tree with identical structure to the XML input. Each element maps to a Datum or ListDatum object, and attributes are mapped to Datum properties.

Author:
jsheets

Field Summary
static java.lang.String CRIMSON_READER
          The fully qualified class for the Apache Crimson SAX2 XML Reader
static java.lang.String DOCUMENT_INFO_PROPERTY
          The name of the root property which contains all document-level info
static java.lang.String NOTATION_NAME_PROPERTY
          The name of the property which contains the NOTATION target name
static java.lang.String NOTATION_PUBLIC_PROPERTY
          The name of the property which contains the NOTATION PUBLIC value
static java.lang.String NOTATION_SYSTEM_PROPERTY
          The name of the property which contains the NOTATION SYSTEM value
static java.lang.String NOTATION_TYPE
          The Datum 'type' of all Datum objects which contain NOTATION content
static java.lang.String PCDATA_PROPERTY
          The name of the property which contains the actual PCDATA content
static java.lang.String PCDATA_TYPE
          The Datum 'type' of all Datum objects which contain PCDATA content
static java.lang.String PI_DATA_PROPERTY
          The name of the property which contains the PI content
static java.lang.String PI_TARGET_PROPERTY
          The name of the property which contains the PI target name
static java.lang.String PI_TYPE
          The Datum 'type' of all Datum objects which contain PI content
static java.lang.String XERCES_READER
          The fully qualified class for the Apache Xerces SAX2 XML Reader
 
Constructor Summary
SAXLoader()
          Creates a new instance of SAXLoader
SAXLoader(java.lang.String readerClass)
          Creates a new instance of SAXLoader with a custom parser.
 
Method Summary
 void attributeDecl(java.lang.String eName, java.lang.String aName, java.lang.String type, java.lang.String valueDefault, java.lang.String value)
          Report an attribute type declaration.
 void characters(char[] ch, int start, int length)
          SAX callback for processing XML PCDATA character data.
 void comment(char[] ch, int start, int length)
          Report an XML comment anywhere in the document.
 void elementDecl(java.lang.String name, java.lang.String model)
          Report an element type declaration.
 void endCDATA()
          Report the end of a CDATA section.
 void endDocument()
          Receive SAX notification of the end of the document.
 void endDTD()
          Report the end of DTD declarations.
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
          SAX callback for ending an XML element.
 void endEntity(java.lang.String name)
          Report the end of an entity.
 void endPrefixMapping(java.lang.String prefix)
          Ends the scope of a prefix-URI Namespace mapping.
 void error(org.xml.sax.SAXParseException e)
          SAX callback for reporting serious, but non-fatal parsing problems.
 void externalEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
          Report a parsed external entity declaration.
 void fatalError(org.xml.sax.SAXParseException e)
          SAX callback for reporting fatal parsing problems.
 void internalEntityDecl(java.lang.String name, java.lang.String value)
          Report an internal entity declaration.
 boolean isNotationsEnabled()
          Determines if the loader should keep track of XML NOTATIONs.
 boolean isProcessingInstructionsEnabled()
          Determines if the loader should keep track of XML processing instructions.
 boolean isStrictWhitespace()
          Determines if the loader should unconditionally load up all whitespace in the XML document.
 boolean isUnicodeCheckEnabled()
          Determines if the loader is currently configured to check for invalid Unicode characters.
 Datum load(java.io.Reader reader)
          Parses an XML stream into a tree of Datum objects.
 Datum load(java.io.Reader reader, java.lang.String baseURI)
          Parses an XML stream into a tree of Datum objects using a base URI path to resolve relative paths in the XML document.
 Datum load(java.lang.String fileName)
          Parses the given file into a tree of Datum objects.
static void main(java.lang.String[] args)
          Convenience method for testing dynamic XMLReader loading.
 void notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
          Receive notification of a notation declaration.
 void processingInstruction(java.lang.String target, java.lang.String data)
          Receive notification of a processing instruction.
 void setDocumentLocator(org.xml.sax.Locator locator)
          Receives a Locator for describing the current document position.
 void setNotationsEnabled(boolean notationsEnabled)
          Changes the current policy for handling XML NOTATIONs.
 void setProcessingInstructionsEnabled(boolean piEnabled)
          Changes the current policy for handling XML processing instructions.
 void setStrictWhitespace(boolean strictWhitespace)
          Sets the current strict whitespace policy.
 void setUnicodeCheckEnabled(boolean unicodeCheckEnabled)
          Changes the current Unicode content checking policy.
 void setValidate(boolean validate)
          Enables or disables the SAX XML validation mode.
 void startCDATA()
          Report the start of a CDATA section.
 void startDocument()
          Receive SAX notification of the beginning of the document.
 void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
          Report the start of DTD declarations, if any.
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
          SAX callback for starting a new XML element.
 void startEntity(java.lang.String name)
          Report the beginning of some internal and external XML entities.
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          Begins the scope of a prefix-URI Namespace mapping.
 void unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName)
          Receive notification of an unparsed entity declaration.
 void warning(org.xml.sax.SAXParseException e)
          SAX callback for reporting non-fatal parsing problems.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
ignorableWhitespace, resolveEntity, skippedEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCUMENT_INFO_PROPERTY

public static final java.lang.String DOCUMENT_INFO_PROPERTY
The name of the root property which contains all document-level info

See Also:
Constant Field Values

PCDATA_TYPE

public static final java.lang.String PCDATA_TYPE
The Datum 'type' of all Datum objects which contain PCDATA content

See Also:
Constant Field Values

PCDATA_PROPERTY

public static final java.lang.String PCDATA_PROPERTY
The name of the property which contains the actual PCDATA content

See Also:
Constant Field Values

PI_TYPE

public static final java.lang.String PI_TYPE
The Datum 'type' of all Datum objects which contain PI content

See Also:
Constant Field Values

PI_TARGET_PROPERTY

public static final java.lang.String PI_TARGET_PROPERTY
The name of the property which contains the PI target name

See Also:
Constant Field Values

PI_DATA_PROPERTY

public static final java.lang.String PI_DATA_PROPERTY
The name of the property which contains the PI content

See Also:
Constant Field Values

NOTATION_TYPE

public static final java.lang.String NOTATION_TYPE
The Datum 'type' of all Datum objects which contain NOTATION content

See Also:
Constant Field Values

NOTATION_NAME_PROPERTY

public static final java.lang.String NOTATION_NAME_PROPERTY
The name of the property which contains the NOTATION target name

See Also:
Constant Field Values

NOTATION_PUBLIC_PROPERTY

public static final java.lang.String NOTATION_PUBLIC_PROPERTY
The name of the property which contains the NOTATION PUBLIC value

See Also:
Constant Field Values

NOTATION_SYSTEM_PROPERTY

public static final java.lang.String NOTATION_SYSTEM_PROPERTY
The name of the property which contains the NOTATION SYSTEM value

See Also:
Constant Field Values

CRIMSON_READER

public static final java.lang.String CRIMSON_READER
The fully qualified class for the Apache Crimson SAX2 XML Reader

See Also:
Constant Field Values

XERCES_READER

public static final java.lang.String XERCES_READER
The fully qualified class for the Apache Xerces SAX2 XML Reader

See Also:
Constant Field Values
Constructor Detail

SAXLoader

public SAXLoader()
Creates a new instance of SAXLoader


SAXLoader

public SAXLoader(java.lang.String readerClass)
Creates a new instance of SAXLoader with a custom parser. Will use the supplied fully qualified XMLReader class as its SAX parser.

Parameters:
readerClass - SAX parser class name, or null to use default
Method Detail

isStrictWhitespace

public boolean isStrictWhitespace()
Determines if the loader should unconditionally load up all whitespace in the XML document. If true, the loader loads all character PCDATA. If false, the loader will discard whitespace in elements that contain no non-whitespace PCDATA. When strict whitespace is enabled, the resulting Datum tree can be much larger than without it, since every span of PCDATA must be wrapped by a separate Datum object. Thus, by default, strict whitespace is disabled.

Returns:
true if strict whitespace loading is enabled

setStrictWhitespace

public void setStrictWhitespace(boolean strictWhitespace)
Sets the current strict whitespace policy. If true, the loader loads all character PCDATA. If false, the loader will discard whitespace in elements that contain no non-whitespace PCDATA. When strict whitespace is enabled, the resulting Datum tree can be much larger than without it, since every span of PCDATA must be wrapped by a separate Datum object. Thus, by default, strict whitespace is disabled.

Parameters:
strictWhitespace - true if strict whitespace loading should be enabled

isProcessingInstructionsEnabled

public boolean isProcessingInstructionsEnabled()
Determines if the loader should keep track of XML processing instructions. If enabled, PIs will be saved as special Datum child nodes of the type PI_TYPE. If any PIs occur outside the root element, they will be saved as a property on the root node of the type Datum[]; PIs before the root are saved in the property PI_BEFORE_ROOT, and PIs after the root are saved in PI_AFTER_ROOT. By default, processing instructions are ignored.

Returns:
true if XML processing instructions should be saved

setProcessingInstructionsEnabled

public void setProcessingInstructionsEnabled(boolean piEnabled)
Changes the current policy for handling XML processing instructions. If set to true, PIs will be saved as special Datum child nodes of the type PI_TYPE. If any PIs occur outside the root element, they will be saved as a property on the root node of the type Datum[]; PIs before the root are saved in the property PI_BEFORE_ROOT, and PIs after the root are saved in PI_AFTER_ROOT. By default, processing instructions are ignored.

Parameters:
piEnabled - true if XML processing instructions should be saved

isNotationsEnabled

public boolean isNotationsEnabled()
Determines if the loader should keep track of XML NOTATIONs. If enabled, NOTATIONSs will be saved as special Datum child nodes of the type NOTATION_TYPE. The NOTATION name will be stored in the NOTATION_NAME property, and the SYSTEM and/or PUBLIC references will be stored in the properties NOTATION_SYSTEM_PROPERTY and NOTATION_PUBLIC_PROPERTY, respectively. By default, NOTATIONs are ignored.

Returns:
true if XML NOTATIONs should be saved

setNotationsEnabled

public void setNotationsEnabled(boolean notationsEnabled)
Changes the current policy for handling XML NOTATIONs. If enabled, NOTATIONSs will be saved as special Datum child nodes of the type NOTATION_TYPE. The NOTATION name will be stored in the NOTATION_NAME property, and the SYSTEM and/or PUBLIC references will be stored in the properties NOTATION_SYSTEM_PROPERTY and NOTATION_PUBLIC_PROPERTY, respectively. By default, NOTATIONs are ignored.

Parameters:
notationsEnabled - true if XML NOTATIONs should be saved

isUnicodeCheckEnabled

public boolean isUnicodeCheckEnabled()
Determines if the loader is currently configured to check for invalid Unicode characters. If enabled, all XML documents with invalid Unicode will fail to load. By default, Unicode checking is disabled.

Returns:
true if unicode checking is enabled

setUnicodeCheckEnabled

public void setUnicodeCheckEnabled(boolean unicodeCheckEnabled)
Changes the current Unicode content checking policy. If set to true, SAXLoader will ensure that XML documents do not contain invalid Unicode characters. If enabled, all XML documents with invalid Unicode will fail to load. By default, Unicode checking is disabled.

Parameters:
unicodeCheckEnabled - true to turn on extra Unicode checking, or false to turn it off.

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Receives a Locator for describing the current document position.

Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Parameters:
locator - SAX Locator object

setValidate

public void setValidate(boolean validate)
Enables or disables the SAX XML validation mode. Attempts to set the http://xml.org/sax/features/validation SAX property on the current parser, if possible.

Parameters:
validate - if true, attempt to enable validation parsing

load

public Datum load(java.io.Reader reader)
           throws UmberClassException,
                  BellowsIOException,
                  BellowsParseException
Parses an XML stream into a tree of Datum objects. Elements are mapped to ListDatum objects, and attributes are mapped to properties of those ListDatum objects. PCDATA sections are loaded as Datum objects, with 100% whitespace chunks ignored. Looks for a user-defined XML parser, but will fall back upon whatever the SAXParserFactory finds, including the Java 1.4 XML parser.

Parameters:
reader - the input source for the XML
Returns:
the loaded root ListDatum object
Throws:
UmberClassException - if unable to find any XML parsers
BellowsParseException - if XML parsing errors occur
BellowsIOException - if I/O errors occur

load

public Datum load(java.lang.String fileName)
           throws UmberClassException,
                  BellowsIOException,
                  BellowsParseException
Parses the given file into a tree of Datum objects. Sets the base URI to the directory containing the XML file. Elements are mapped to ListDatum objects, and attributes are mapped to properties of those ListDatum objects. PCDATA sections are loaded as Datum objects, with 100% whitespace chunks ignored. Looks for a user-defined XML parser, but will fall back upon whatever the SAXParserFactory finds, including the Java 1.4 XML parser.

Parameters:
fileName - the XML file to load
Returns:
the loaded root ListDatum object
Throws:
UmberClassException - if unable to find any XML parsers
BellowsParseException - if XML parsing errors occur
BellowsIOException - if I/O errors occur

load

public Datum load(java.io.Reader reader,
                  java.lang.String baseURI)
           throws UmberClassException,
                  BellowsIOException,
                  BellowsParseException
Parses an XML stream into a tree of Datum objects using a base URI path to resolve relative paths in the XML document. Elements are mapped to ListDatum objects, and attributes are mapped to properties of those ListDatum objects. PCDATA sections are loaded as Datum objects, with 100% whitespace chunks ignored. Looks for a user-defined XML parser, but will fall back upon whatever the SAXParserFactory finds, including the Java 1.4 XML parser.

Parameters:
reader - the input source for the XML
baseURI - URI for resolving relative entity paths
Returns:
the loaded root ListDatum object
Throws:
UmberClassException - if unable to find any XML parsers
BellowsParseException - if XML parsing errors occur
BellowsIOException - if I/O errors occur

startDocument

public void startDocument()
Receive SAX notification of the beginning of the document. Used to initialized per-document variables.

Specified by:
startDocument in interface org.xml.sax.ContentHandler

endDocument

public void endDocument()
Receive SAX notification of the end of the document. Used to create DocumentInfo object and load it with XML declaration, processing instructions, and NOTATION declarations.

Specified by:
endDocument in interface org.xml.sax.ContentHandler

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws org.xml.sax.SAXException
Begins the scope of a prefix-URI Namespace mapping.

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
prefix - the namespace prefix being declared
uri - the namespace URI the prefix is mapped to
Throws:
org.xml.sax.SAXException - if a parsing error occurs

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws org.xml.sax.SAXException
Ends the scope of a prefix-URI Namespace mapping.

Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
prefix - the namespace prefix being declared
Throws:
org.xml.sax.SAXException - if a parsing error occurs

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
SAX callback for starting a new XML element.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Parameters:
uri -
localName -
qName -
attributes -
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
SAX callback for ending an XML element.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Parameters:
uri -
localName -
qName -
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
SAX callback for processing XML PCDATA character data.

Specified by:
characters in interface org.xml.sax.ContentHandler
Parameters:
ch -
start -
length -
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.characters(char[], int, int)

notationDecl

public void notationDecl(java.lang.String name,
                         java.lang.String publicId,
                         java.lang.String systemId)
                  throws org.xml.sax.SAXException
Receive notification of a notation declaration.

Specified by:
notationDecl in interface org.xml.sax.DTDHandler
Parameters:
name - the notation name
publicId - the notation public identifier, or null if not available
systemId - the notation system identifier
Throws:
org.xml.sax.SAXException - any SAX exception, possibly wrapping another exception
See Also:
DTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Receive notification of a processing instruction.

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Parameters:
target - the processing instruction target
data - the processing instruction data, or null if none is supplied
Throws:
org.xml.sax.SAXException - any SAX exception, possibly wrapping another exception
See Also:
ContentHandler.processingInstruction(java.lang.String, java.lang.String)

unparsedEntityDecl

public void unparsedEntityDecl(java.lang.String name,
                               java.lang.String publicId,
                               java.lang.String systemId,
                               java.lang.String notationName)
                        throws org.xml.sax.SAXException
Receive notification of an unparsed entity declaration.

Specified by:
unparsedEntityDecl in interface org.xml.sax.DTDHandler
Parameters:
name - the entity name
publicId - the entity public identifier, or null if not available
systemId - the entity system identifier
notationName - the name of the associated notation
Throws:
org.xml.sax.SAXException - any SAX exception, possibly wrapping another exception
See Also:
DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

startDTD

public void startDTD(java.lang.String name,
                     java.lang.String publicId,
                     java.lang.String systemId)
              throws org.xml.sax.SAXException
Report the start of DTD declarations, if any.

Specified by:
startDTD in interface org.xml.sax.ext.LexicalHandler
Parameters:
name - the document type name
publicId - the declared public identifier for the external DTD subset, or null if none was declared
systemId - the declared system identifier for the external DTD subset, or null if none was declared
Throws:
org.xml.sax.SAXException - if a parsing error occurs

endDTD

public void endDTD()
            throws org.xml.sax.SAXException
Report the end of DTD declarations.

Specified by:
endDTD in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException - if a parsing error occurs

startEntity

public void startEntity(java.lang.String name)
                 throws org.xml.sax.SAXException
Report the beginning of some internal and external XML entities.

Specified by:
startEntity in interface org.xml.sax.ext.LexicalHandler
Parameters:
name - the name of the entity; if it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be "[dtd]"
Throws:
org.xml.sax.SAXException - if a parsing error occurs

endEntity

public void endEntity(java.lang.String name)
               throws org.xml.sax.SAXException
Report the end of an entity.

Specified by:
endEntity in interface org.xml.sax.ext.LexicalHandler
Parameters:
name - the name of the entity that is ending
Throws:
org.xml.sax.SAXException - if a parsing error occurs

startCDATA

public void startCDATA()
                throws org.xml.sax.SAXException
Report the start of a CDATA section.

Specified by:
startCDATA in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException - if a parsing error occurs

endCDATA

public void endCDATA()
              throws org.xml.sax.SAXException
Report the end of a CDATA section.

Specified by:
endCDATA in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException - if a parsing error occurs

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws org.xml.sax.SAXException
Report an XML comment anywhere in the document.

Specified by:
comment in interface org.xml.sax.ext.LexicalHandler
Parameters:
ch - an array holding the characters in the comment
start - the starting position in the array
length - the number of characters to use from the array
Throws:
org.xml.sax.SAXException - if a parsing error occurs

attributeDecl

public void attributeDecl(java.lang.String eName,
                          java.lang.String aName,
                          java.lang.String type,
                          java.lang.String valueDefault,
                          java.lang.String value)
                   throws org.xml.sax.SAXException
Report an attribute type declaration.

Specified by:
attributeDecl in interface org.xml.sax.ext.DeclHandler
Parameters:
eName - the name of the associated element
aName - the name of the attribute
type - a string representing the attribute type
valueDefault - a string representing the attribute default ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies
value - a string representing the attribute's default value, or null if there is none
Throws:
org.xml.sax.SAXException - if a parsing error occurs

elementDecl

public void elementDecl(java.lang.String name,
                        java.lang.String model)
                 throws org.xml.sax.SAXException
Report an element type declaration.

Specified by:
elementDecl in interface org.xml.sax.ext.DeclHandler
Parameters:
name - the element type name
model - the content model as a normalized string
Throws:
org.xml.sax.SAXException - if a parsing error occurs

externalEntityDecl

public void externalEntityDecl(java.lang.String name,
                               java.lang.String publicId,
                               java.lang.String systemId)
                        throws org.xml.sax.SAXException
Report a parsed external entity declaration.

Specified by:
externalEntityDecl in interface org.xml.sax.ext.DeclHandler
Parameters:
name - the name of the entity; if it is a parameter entity, the name will begin with '%'
publicId - the declared public identifier of the entity, or null if none was declared
systemId - the declared system identifier of the entity
Throws:
org.xml.sax.SAXException - if a parsing error occurs

internalEntityDecl

public void internalEntityDecl(java.lang.String name,
                               java.lang.String value)
                        throws org.xml.sax.SAXException
Report an internal entity declaration.

Specified by:
internalEntityDecl in interface org.xml.sax.ext.DeclHandler
Parameters:
name - the name of the entity; if it is a parameter entity, the name will begin with '%'
value - the replacement text of the entity
Throws:
org.xml.sax.SAXException - if a parsing error occurs

warning

public void warning(org.xml.sax.SAXParseException e)
             throws org.xml.sax.SAXException
SAX callback for reporting non-fatal parsing problems.

Specified by:
warning in interface org.xml.sax.ErrorHandler
Parameters:
e - the warning information encoded as an exception
Throws:
org.xml.sax.SAXException - if a parsing error occurs

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXException
SAX callback for reporting fatal parsing problems.

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Parameters:
e - the error information encoded as an exception
Throws:
org.xml.sax.SAXException - if a parsing error occurs

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
SAX callback for reporting serious, but non-fatal parsing problems.

Specified by:
error in interface org.xml.sax.ErrorHandler
Parameters:
e - the error information encoded as an exception
Throws:
org.xml.sax.SAXException - if a parsing error occurs

main

public static void main(java.lang.String[] args)
                 throws UmberClassException
Convenience method for testing dynamic XMLReader loading. Run this to see how SAXLoader behaves in different Java environments and classpaths.

Parameters:
args - not used
Throws:
UmberClassException