Elliot,
I'm confused by your statement below ("...in Mac OS X format. So it might
have : in the path"). If by "Mac OS X format" you mean "posix format" then
the path should be usable as-is for Xerces. But you also say it may have
colons in it. A colon is a perfectly legitimate part of a posix path, but it
has no meaning as a component separator. However this is confusing because
colon is the path separator for traditional Mac OS paths.
If what you have is a traditional style hfs path with colons as separators,
you cannot reliably simply replace the colons with slashes, at least on OS
X. This is due to issues with placement of the volume name and the fact that
such a path will be made up only of "short" file/directory names. In this
case you'll need to convert the path to the proper (posix) form.
There are several means of converting path forms, though Xerces itself
provides no complete help in doing so. You could use CFURL.h to convert from
kCFURLHFSPathStyle to kCFURLPOSIXPathStyle. You could also use Apple's
MoreFilesX routines to convert a traditional path to an FSSpec or FSRef,
then use the Xerces utilities to convert that to a path as desired for
Xerces.
I hope that helps to clear things up....
James.
On 8/1/03 4:58 AM, "Adam Heinz" <[EMAIL PROTECTED]> wrote:
> There is a ConvertColonToSlash in MacOSPlatformUtils. Looking at the cpp, it
> seems pretty simple -- you will need to trim off the "Macintosh HD" from the
> front when it's done.
>
> adam
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 01, 2003 12:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Mac OS X paths
>
> Actually, another app is feeding the path to my program, so the path will
> be in Mac OS X format. So, it might have : in the path. The data is given
> to my app in an app-specific format which is easily changed to a char*.
> After that I have had a difficult time getting very far ;-)
>
> ---------------------------------------------------------------------
> 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]