Exceção no programa Xerces de duas linhas
O código a seguir me dá uma exceção noXMLFormatTarget
linha, mas se eu mudar a string de"C:/test.xml"
para"test.xml"
Funciona bem.
// test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/framework/LocalFileFormatTarget.hpp>
using namespace xercesc;
int main()
{
XMLPlatformUtils::Initialize();
XMLFormatTarget *formatTarget = new LocalFileFormatTarget("C:/test.xml");
return 0;
}
A exceção de Xerces é:
Mensagem de erro: não foi possível abrir o arquivo 'C: \ test.xml'
A exceção do Windows é:
Acesso negado