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 Ovanes Markarian <om...@keywallet.com> on 2005/04/06 20:48:01 UTC
URLInputSource or LocalFileInputSource fails under cygwin
Hi all!
I am trying to open a local file under cygwin using either the URI or
local unix name for it. Under Win32 (XP) this code works fine, but under
Cygwin it fails. I tried a lot of approaches, like splitting the path
into the systemId and relative path or passing the entire path.
Can someone suggest what could be wrong here? I am using Xerces-C 2.6.0.
//will automatically convert to XMLCh*
MyStringClass basePath="file:///c:/someDir/";
MyStringClass relFilePath="./someXMLfile.xml";
URLInputSource is(static_cast<const XMLCh*>(basePath),
static_cast<const XMLCh*>(relFilePath));
BinInputStream* stream=is.makeStream();
XMLByte bytes[1024]={0};
size_t read=0;
do
{
read=stream->readBytes(bytes, 1024);
}while(read==1024);
I also tryied using LocalFileInputSource with URI, UNIX like path
(/cygdrive/c/...) and windows path (c:\\...) with no luck.
Please help!
Thanks,
Ovanes
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org