You may not have sufficient permissions to write to C:\. In this case, Xerces may report an error that throws an exception.
The exception is Access Deniedusually what you would expect if you tried to write to the system directory without administrator credentials.
, :
XMLFormatTarget *formatTarget = new LocalFileFormatTarget("C:\\test.xml");
Windows "\". ( Xerces, ). C C++ escape, , , "litteral".
, , , .
, , delete formatTarget. , , , :
delete formatTarget;
:
boost::scoped_ptr<XMLFormatTarget> formatTarget(new LocalFileFormatTarget("C:\\test.xml"));
.