use ifstream instead of fopen for reading resources
Fixed ParseXml to properly work