1
這是我一直想:Cocos2d-x使用pugixml解析來自URL內容的XML,我該怎麼做?
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;
我想要做這樣的事情:
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
編輯1:
顯然,這是不可能的。 http://code.google.com/p/pugixml/issues/detail?id=116
那麼我應該如何前進?