Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

SAXSQLHandler Class Reference

#include <sqlstreamer.hpp>

Collaboration diagram for SAXSQLHandler:

Collaboration graph
[legend]
List of all members.

Detailed Description

Parses an input XML tabular data stream, bind its data to a SQL statement and outputs resulting data as a tabular XML data stream.

Definition at line 76 of file sqlstreamer.hpp.

Public Methods

 SAXSQLHandler (DBStreamerFactory *p_pStreamerFactory, StreamerParams *p_pParameters, XMLFlowContext *p_pStreamContext, XMLStreamConsumer *p_pStreamConsumer)
 ~SAXSQLHandler ()
 Destructor.

void startDocument ()
 Receive notification of the beginning of a document. Inits parsing global variables.

void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs)
 Receive notification of the beginning of an element. Updates paring depth.

void characters (const XMLCh *const chars, const unsigned int length)
 Receive notification of character data. If parsing a "cell" of the tabular data, appends received characters to the field data buffer.

void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
 Receive notification of the end of an element. If element is a "cell" of tabular XML data, tries to bind its content to the SQL statement. If element is a "row" of tabular XML data, performs flush and commit operations.

void endDocument ()
 Receive notification of the end of a document. Performs last flush and commit operations.

void ignorableWhitespace (const XMLCh *const chars, const unsigned int length)
void processingInstruction (const XMLCh *const target, const XMLCh *const data)
void setDocumentLocator (const Locator *const locator)
void startPrefixMapping (const XMLCh *const prefix, const XMLCh *const uri)
void endPrefixMapping (const XMLCh *const prefix)
void skippedEntity (const XMLCh *const name)


Constructor & Destructor Documentation

SAXSQLHandler::SAXSQLHandler DBStreamerFactory   p_pStreamerFactory,
StreamerParams   p_pParameters,
XMLFlowContext   p_pStreamContext,
XMLStreamConsumer   p_pStreamConsumer
 

Definition at line 78 of file sqlstreamer.cpp.

References concatCharBuffer(), copyCharBuffer(), DEBUG_CREATE, XMLStreamer::getParamValue(), XMLFlowContext::getThreadId(), importCharBuffer(), and upperize().

SAXSQLHandler::~SAXSQLHandler  
 

Destructor.

Definition at line 131 of file sqlstreamer.cpp.

References DEBUG_DEL, XMLFlowContext::getThreadId(), and releaseCharBuffer().


Member Function Documentation

void SAXSQLHandler::characters const XMLCh *const    chars,
const unsigned int    length
 

Receive notification of character data. If parsing a "cell" of the tabular data, appends received characters to the field data buffer.

Parameters:
chars The characters from the XML document.
length The number of characters to read from the array.
Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.

Definition at line 167 of file sqlstreamer.cpp.

References concatCharBuffer(), DEBUG_FUNC, XMLFlowContext::getTranscoder(), releaseCharBuffer(), and XSTR().

void SAXSQLHandler::endDocument  
 

Receive notification of the end of a document. Performs last flush and commit operations.

Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.
XMLFlowException ERRCODE_CAUSE_DATAACCESS

Definition at line 258 of file sqlstreamer.cpp.

References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, DEBUG_FUNC, ON_XML_FLOW_ERROR_DO, PREP_CATCH_XML_FLOW_ERROR, SQLSTREAMER_TAGNAME, and WATCH_XML_FLOW_ERROR.

void SAXSQLHandler::endElement const XMLCh *const    uri,
const XMLCh *const    localname,
const XMLCh *const    qname
 

Receive notification of the end of an element. If element is a "cell" of tabular XML data, tries to bind its content to the SQL statement. If element is a "row" of tabular XML data, performs flush and commit operations.

Parameters:
uri The URI of the asscioated namespace for this element
localname The local part of the element name
qname The QName of this element
Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.
XMLFlowException ERRCODE_CAUSE_DATAACCESS

Definition at line 195 of file sqlstreamer.cpp.

References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, DEBUG_IN, DEBUG_OUT, XMLFlowContext::getTranscoder(), ON_XML_FLOW_ERROR_DO, PREP_CATCH_XML_FLOW_ERROR, releaseCharBuffer(), WATCH_XML_FLOW_ERROR, XMLPROCESSOR_MAX_TAG_SIZE, and XSTR().

void SAXSQLHandler::endPrefixMapping const XMLCh *const    prefix [inline]
 

Definition at line 192 of file sqlstreamer.hpp.

void SAXSQLHandler::ignorableWhitespace const XMLCh *const    chars,
const unsigned int    length
[inline]
 

Definition at line 188 of file sqlstreamer.hpp.

void SAXSQLHandler::processingInstruction const XMLCh *const    target,
const XMLCh *const    data
[inline]
 

Definition at line 189 of file sqlstreamer.hpp.

void SAXSQLHandler::setDocumentLocator const Locator *const    locator [inline]
 

Definition at line 190 of file sqlstreamer.hpp.

void SAXSQLHandler::skippedEntity const XMLCh *const    name [inline]
 

Definition at line 193 of file sqlstreamer.hpp.

void SAXSQLHandler::startDocument  
 

Receive notification of the beginning of a document. Inits parsing global variables.

Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.

Definition at line 151 of file sqlstreamer.cpp.

References DEBUG_FUNC.

void SAXSQLHandler::startElement const XMLCh *const    uri,
const XMLCh *const    localname,
const XMLCh *const    qname,
const Attributes &    attrs
 

Receive notification of the beginning of an element. Updates paring depth.

Parameters:
uri The URI of the asscioated namespace for this element
localname The local part of the element name
qname The QName of this element
attrs The attributes attached to the element, if any.
Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.

Definition at line 184 of file sqlstreamer.cpp.

References DEBUG_FUNC.

void SAXSQLHandler::startPrefixMapping const XMLCh *const    prefix,
const XMLCh *const    uri
[inline]
 

Definition at line 191 of file sqlstreamer.hpp.


The documentation for this class was generated from the following files:
Generated on Sat Oct 4 13:24:43 2003 for XDFLengine by doxygen1.3-rc2