Dear David,
Thanks for your help. I have left my project behind for 3 weeks because I
have to attend 2-week course in Italy and 1-week course in England. Today I
try to catch up where I left. Now, I have tried what you told me three weeks
ago... however I am not sure what exactly you mean about "verify the file
routine..." (see in the following attached message). Please help. Thank you
very much. Wish you all the best.
Best regards,
--------------------------------------------
Jordan Cheun Ngen, Chong
Room 4067
Distributed and Embeded Systems Group
Centre for Telematics and Information Technology
University of Twente
Faculty Informatica
7522 NB Enschede
The Netherlands
--------------------------------------------
Office Phone: +31 53 4894655
Web site: http://www.cs.utwente.nl/~chong
Email Add.: [EMAIL PROTECTED]
============================================
> -----Original Message-----
> From: Adams, David [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 29, 2001 4:28 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Help on Application Error
>
>
> Hi Jordan, I'm not available to the list Mon-Thur and I'm catching up. I
> didn't see anyone respond to this so I will give it a shot. I
> have noticed
> that if the filename given to the parser to parse is invalid, that the
> parser neither calls an error handler or throws an exception. It simply
> instantiates an empty document of which the first element is
> basically NULL.
> Hence, the following three lines will work.
>
> parser->parse(xmlFile);
> DOM_Document doc = parser->getDocument(); //
> Empty document
> DOM_Element root = doc.getDocumentElement(); //
> first element of an empty document contains an internal NULL 'fImpl'.
>
> 'root' ends up having an internal 'fImpl' member of NULL. The
> 'getElementsByTagName()' call tries to access this NULL 'fImpl'
> pointer and
> hence, blows up. So one suggestion I can offer up is to verify your
> 'xmlFile' path to the DOMParser::parse(xmlFile') routine.
>
>
>
> > -----Original Message-----
> > From: J. Chong [SMTP:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 26, 2001 5:44 AM
> > To: [EMAIL PROTECTED]
> > Subject: Help on Application Error
> >
> > Dear all,
> >
> > I am very new to Xerces-C. I have the following codes (in MSVC++)
> >
> > I am trying to build the .EXE for the following codes. The
> > compilation is OK. But when I tried to run this code, some problem
> > happens. System complains on Application Error. I have checked it... and
> > it happens at the DOM_NodeList... Please help. I am
> struggling.... Please
> > help. Thanks. Wish you all the best.
> >
> >
> > #include <util/PlatformUtils.hpp>
> > #include <util/XMLString.hpp>
> > #include <util/XMLUniDefs.hpp>
> > #include <dom/DOM.hpp>
> > #include <parsers/DOMParser.hpp>
> > int main(int argc, char* argv[])
> > {
> > char *xmlFile = "me.xml";
> > DOMString nodeValue;
> > DOMString nodeName;
> > try {
> > XMLPlatformUtils::Initialize();
> > } catch (const XMLException &toCatch) {
> > cout << "Error during initialization! :\n"
> > << toCatch.getMessage() << "\n";
> > return 1;
> > }
> > DOMParser *parser = new DOMParser();
> > try {
> > parser->parse(xmlFile);
> > DOM_Document doc = parser->getDocument();
> > DOM_Element root = doc.getDocumentElement();
> > DOM_NodeList list =
> > root.getElementsByTagName("ENABLINGBITS");
> > } catch (const XMLException &toCatch) {
> > cout << "\nFile not found: " << xmlFile << "\n"
> > << "Exception message is: \n"
> > << toCatch.getMessage() << "\n";
> > return -1;
> > }
> > XMLPlatformUtils::Terminate();
> > return 0;
> >
> > }
> >
> >
> >
> > Best regards,
> > Jordan CN CHONG
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]