This is what I’ve been trying:
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file("Book.xml"); // need to change this
std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
I want to do something like this:
URL url;
url = new URL("http://.....");
URLConnection ucon = url.openConnection();
ucon.connect();
pugi::xml_parse_result result = doc.load_file(url.openStream()); // need to change this
EDIT 1:
Apparently this is not possible.
http://code.google.com/p/pugixml/issues/detail?id=116
So how should I move forward?
I used the cURL library to get content from URL and save it to a string, like so:
Then I parsed the data contained within the string:
Easy peasy 🙂