Darren Odom wrote:
Well, I made a little progress but I could still use some
guidance. I am still clueless as to how I should get the data between
tags using SAX. If anyone can tell me how, that would make my day. I
There is not that much difference between SAX and SAX2 in this regard. In
SAX, you use DocumentHandler::characters() and in SAX2,
ContentHandler::characters().
DID figure out how to get that data using SAX2, using the
ContentHandlerr::characters function. The only problem is that every
time I try to parse a document with a SAX2XMLReader my program crashes
with an unhandled exception. Specifically, the error looks like this.
First-chance exception in ConSaxTest.exe (KERNEL32.DLL): 0xE06D7363:
Microsoft C++ Exception.
Do you have exception handling enabled for your application? Take a look
at the samples apps for basic information about how to write your code and
for the appropriate compiler/linker options.
I am using Microsoft Visual Studio 6.0 as my dev
environment. I can't tell exactly where in the Xercesc dll the problem
is happening but it is 2 function calls below the SAX2XMLReader::parse
function. It is occurring before any of my ContentHandler or
ErrorHandler functions get called. I thought it might have been my
source or my code but I have tried parsing different documents of
different input types, URL, Local File, Memory Buffer, all to no avail.
I have also tried running the sample application located here,
http://www.ibm.com/developerworks/xml/library/x-xercc/sidefile1.html,
substituting the default handler for the handler used in the example and
I got the same error. It may be an issue with VC++ 6.0 or my
environment. I don't know. But I do know that the original
SAXParser::parse function works great and does not generate this
exception.
Can anyone out there offer me any advice?
If SAX works, then there should be no real reason why SAX2 wouldn't work.
Perhaps if you show us some of your code, we can help.
Dave