reading xml file: buffer incomplete

reading xml file: buffer incomplete
0.0 0


i’m trying to read an xml file with PugiXml as suggested in many discussion (but i’ve also tried TinyXml2).
My problem is that after calling the load method, my xml document is incomplete: data is partial!

The file path is correctly retrieved. Even the file content is correct if loaded inside a char (see pBuffer in the code below).

I’ve also tried different xml files but nothing seems to work.

The *doc variable contains every string until the first “>” character inside my xml document.
Have someone else experienced this problem?
any suggestion is appreciated ! Thak you!
My code:
cocos2d::CCFileUtils* fileUtils = cocos2d::CCFileUtils::sharedFileUtils;
static char path[50] = “xmllevels” ;
const char**filename;
pugi::xml_document *doc;
std::string fullPath = fileUtils->fullPathFromRelativePath;
*filename = fullPath.c_str();

unsigned long bufferSize = 0;
unsigned char* pBuffer = fileUtils->getFileData(*filename, “r”, &bufferSize);
pugi::xml_parse_result result =*doc.load_file(_filename);



help me please :slight_smile: