Hi.
I’m preparing a XMLManager to read and store data, using CCSAXParser, based on libxml2.
Basically, i follow This:
tutorial, and cocos2d-x class reference:
http://www.cocos2d-x.org/reference/native-cpp/d5/d48/classcocos2d\_1\_1\_c\_c\_s\_a\_x\_parser.html
I create a delegate:
CCSAXDelegator * _delegate; // Delegate to set CCSAX class
I use init parsing:
/*
> First step to read a XML File
/
bool XMLManager::initParsing
{
CCSAXParser parser;
>
// Check if UTF-8 format
if )
{
CCLog;
return false; // Format no valid
}
>
// Set delegate
parser.setDelegator;
>
// Create var with path
const charxmlPath = CCFileUtils::fullPathFromRelativePath(“LanguageSpanish.xml”);
>
// Parse Data
parser.parse(xmlPath);
>
return true; // OK
}
But, compiling i get this error:
XMLManager.cpp:51: error: cannot call member function ‘const char* cocos2d::CCFileUtils::fullPathFromRelativePath(const char*)’ without object
Is some problem with last cocos2d-x stable version or i`m doing something wrong?
Thanks in advance.