Reputation: 21136
I have the following code:
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file( "C:/Users/James/Documents/Visual Studio 2013/Projects/Games/Jimmy/Game/Assets/Levels/Scene.dae" );
std::cout << "Load result: " << result.description( ) << ", mesh name: " << doc.child( "mesh" ).attribute( "name" ).value( ) << std::endl;
pugi::xml_node tools = doc.child( "Profile" ).child( "Tools" );
for( pugi::xml_node tool = tools.child( "Tool" ); tool; tool = tool.next_sibling( "Tool" ) )
{
std::cout << "Tool " << tool.attribute( "Filename" ).value( );
std::cout << ": AllowRemote " << tool.attribute( "AllowRemote" ).as_bool( );
std::cout << ", Timeout " << tool.attribute( "Timeout" ).as_int( );
std::cout << ", Description '" << tool.child_value( "Description" ) << "'/n";
}
For some reason I am getting:
+ result {status=status_file_not_found (1) offset=0 encoding=encoding_auto (0) } pugi::xml_parse_result
Any ideas why it can't find my file?
Upvotes: 0
Views: 1293
Reputation: 21136
pugi only opens .xml... I also had to change my path to a relative one.
Upvotes: 0