You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by xe...@xml.apache.org on 2004/10/19 18:21:51 UTC
[jira] Closed: (XERCESC-465) Exception when parsing the xml file
Message:
The following issue has been closed.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESC-465
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESC-465
Summary: Exception when parsing the xml file
Type: Bug
Status: Closed
Resolution: CANNOT REPRODUCE
Project: Xerces-C++
Components:
DOM
Versions:
1.5.1
Assignee:
Reporter: Manminder
Created: Wed, 22 May 2002 11:26 AM
Updated: Tue, 19 Oct 2004 9:20 AM
Environment: Operating System: Windows NT/2K
Platform: Other
Description:
While parsing our xml file (relation.xml) on Win2k we get the following error:
(Actually, there is a relation.xml in the specified directory)
Our Application Message : Importing relation from file relation.xml...
Message from Xerces:
Fatal Error at file "",line 0, colume 0
Message: An exception occured! Type:RuntimeException, Message: The primary
document entity could not be opened. Id=D:\iMAP\bin\xmls\relation.xml
Our code snippet is as follows
DOMParser parser;
//enable schema validation
parser.setValidationScheme(DOMParser::Val_Auto);
parser.setDoNamespaces(true);
parser.setDoSchema(true);
//enable error handler
XMLErrorHandler errorHandler;
parser.setErrorHandler(&errorHandler);
//enable writing of entity nodes back to file
parser.setCreateEntityReferenceNodes(true);
parser.setToCreateXMLDeclTypeNode(true);
//locate xml file
string filename= _path + "/" + _xmlFile;
try {
parser.parse(filename.c_str());
}
catch (const XMLException& ) {
//log error & return
}
catch (const DOM_DOMException& ) {
//log error & return
}
catch (...) {
//log error & return
}
if (errorHandler.getSawErrors()){
//log error
// OUR APPLICATION CATCHES THE ERROR MESSAGE HERE
}
This piece of code works fine on SUN platform
Thanks
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org