tinyxml2 and IOS problem

Hi all,

I need to read XML file content for my project and after a bit of search I noticed that cocos2d-x already use tinyxml2.h, so I have decided to use it too.

It’s working correctly for the Win32 project, but under IOS I always get a file not found error when I try to XMLDocument.load() the file.

Here is how I do it (where “level” is a CCString* with the name of the XML file)

tinyxml2::XMLDocument xmlDoc; xmlDoc.LoadFile(CCFileUtils::sharedFileUtils()->fullPathForFilename(level->getCString()).c_str());

Am I doing something wrong for IOS target ?

Thank in advance.

// Step-3. Create XML Document
m_pXmlDoc = new tinyxml2::XMLDocument();

// Step-4. Move Data to Buffer
unsigned long lSize;
unsigned char* pchFileData = CCFileUtils::sharedFileUtils()>getFileData, “r”, &lSize );
char* pchBuf = new char[ lSize + 1 ];
memcpy;
pchBuf[lSize] = ‘’;
/*for
{
CCLOG ("%c", pchBuf[i]);
}*/
// Step-5. Move Buffer to XML Document
m_pXmlDoc
>Parse( (const char*) pchBuf );
delete [] pchBuf;
delete [] pchFileData;

ChoungIL Lee wrote:
As you say, really successful, good fun, thank you!

#¥#¥#%¥#¥#¥……%