문제

I'm having trouble reading an xml file from a server location. When the file is opened locally on the computer, it appears to work fine. However, when the file is opened from a location on a server, it does not work. Do you know what the problem may be? Am I using the forward slash incorrectly?

The following works:

rapidxml::file<> xmlFile("myfile.xml");
rapidxml::xml_document<> doc;

The following does not work:

rapidxml::file<> xmlFile("http://localhost/myfile.xml");
rapidxml::xml_document<> doc;
도움이 되었습니까?

해결책

Why don’t you use downloader library like ‘curl’ and download to your local and use it like normal file system operation.

다른 팁

RapidXML is just an XML parser, not an HTTP client. You'll need to use an HTTP client library to retrieve a file from a URL.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top