ccl.servlet
Class XMLImportHandler

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--ccl.servlet.XMLImportHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class XMLImportHandler
extends org.xml.sax.helpers.DefaultHandler

Sax2 parser for xml database input.


Constructor Summary
XMLImportHandler(java.sql.Connection connection)
          Creates an instance of this sax handler.
 
Method Summary
 void characters(char[] ac_, int start_, int length_)
          Gets the CDATA from the elements.
 void endElement(java.lang.String namespaceURI_, java.lang.String localName_, java.lang.String qName_)
          Gets invoked from the sax xml parser whenever an element closes.
static void parse(java.sql.Connection connection_, java.lang.String sFileName_)
          This method creates an instance of this parser and pipes the specified file through it.
 void startElement(java.lang.String namespaceURI_, java.lang.String localName_, java.lang.String qName_, org.xml.sax.Attributes atts_)
          Gets invoked from the sax xml parser whenever a new element starts.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLImportHandler

public XMLImportHandler(java.sql.Connection connection)
Creates an instance of this sax handler.

Method Detail

characters

public void characters(char[] ac_,
                       int start_,
                       int length_)
Gets the CDATA from the elements.

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
ac_ - an array of chars, representing the CDATA.
start_ - the start index from ac.
length_ - the length to copy from ac from start index.

startElement

public void startElement(java.lang.String namespaceURI_,
                         java.lang.String localName_,
                         java.lang.String qName_,
                         org.xml.sax.Attributes atts_)
Gets invoked from the sax xml parser whenever a new element starts.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String namespaceURI_,
                       java.lang.String localName_,
                       java.lang.String qName_)
Gets invoked from the sax xml parser whenever an element closes.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

parse

public static void parse(java.sql.Connection connection_,
                         java.lang.String sFileName_)
                  throws java.lang.Exception
This method creates an instance of this parser and pipes the specified file through it.

Throws:
java.lang.Exception - if anything goes wrong while parsing.