[xsd-users] RE: Namspace schema with spaces in the file path
Garry Jeromson
garry.jeromson at enclustra.com
Fri Mar 20 11:58:19 EDT 2015
Found the solution via the Xerces forums - paths with spaces need to have the spaces replaced with "%20", and be prefixed with "file:///".
Cheers,
Garry
-----Original Message-----
From: xsd-users-bounces at codesynthesis.com [mailto:xsd-users-bounces at codesynthesis.com] On Behalf Of Garry Jeromson
Sent: Freitag, 20. März 2015 16:08
To: xsd-users at codesynthesis.com
Subject: [xsd-users] Namspace schema with spaces in the file path
Hullo,
I'm encountering a classic spaces-in-the-path issue; my application expects some XML files to be in a subfolder relative to the .exe, so I get the full path on the fly at run-time. The schema for said XML has a namespace, which I pass in when parsing as follows:
xml_schema::properties xmlProperties;
xmlProperties.schema_location("EepromMemoryMaps", schemaFilePath); auto_ptr<EepromXml::EEPROMMemoryMap> pParsedXml(EepromXml::EEPROMMemoryMap_(eepromMapXmlPath, 0, xmlProperties));
When the path to the .exe has spaces in it (as I'd like to have, so it can live in the Program Files folder on Windows), parsing fails because of the spaces. The error "unable to open primary document entity 'C:\path'" is given in the diagnostics; the full path to the files is "C:\path with spaces".
Is there any way to get around this without hacking away at the generated .cxx file?
Cheers,
Garry
More information about the xsd-users
mailing list