Details
-
Bug
-
Status: Resolved
-
Resolution: Incomplete
-
2.2.0
-
None
-
None
-
Operating System: Other
Platform: Other
-
18432
Description
I created a library on Tandem using Xercesc 2.2.0 . I tried to run the SAXPrint
sample program using the below mentioned command
./SAXPrint Sample.xml
It throws an exception , but the xml file is present in the same directory from
where i am running.
<?xml version="1.0" encoding="LATIN1"?>
Fatal Error at file , line 0, char 0
Message: An exception occurred! Type:XMLPlatformException, Message:Could not r
ead data from file
I looked at the LocalFileInputSource.cpp and TandemPlatformUtils.cpp below
mentioned
LocalFileInputSource::LocalFileInputSource(const XMLCh* const filePath)
{
//
// If the path is relative, then complete it acording to the current
// working directory rules of the current platform. Else, just take
// it as is.
//
if (XMLPlatformUtils::isRelative(filePath))
else
{ setSystemId(filePath); }}
XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath)
{
//
// NOTE: THe path provided has always already been opened successfully,
// so we know that its not some pathological freaky path. It comes in
// in native format, and goes out as Unicode always
//
char* newSrc = XMLString::transcode(srcPath);
// Use a local buffer that is big enough for the largest legal path
char* tmpPath = dirname((char*)newSrc);
if (!tmpPath)
char* newXMLString = new char [strlen(tmpPath) +1];
ArrayJanitor<char> newJanitor(newXMLString);
strcpy(newXMLString, tmpPath);
strcat(newXMLString , "/");
// Return a copy of the path, in Unicode format
return XMLString::transcode(newXMLString);
}
Can somebody please tell me what exactly is going wrong