Xml access

#1
Is this the proper way of doing something with xml?

Code: Select all

//

CryLogAlways("Started");

const char* itemPackageFilePath = "Scripts/UI/PlayerHelper/ShowInformation.xml";
XmlNodeRef itemPackageFile = gEnv->pSystem->LoadXmlFromFile(itemPackageFilePath);

if (itemPackageFile)
{
int numEntries = itemPackageFile->getChildCount();

for (int i = 0; i = numEntries; i++)
{
string currentItem = GetEntity()->GetClass()->GetName();

string searchingItem = itemPackageFile->getChild(i)->getAttr("name");
if (currentItem == searchingItem)
{
i = numEntries; // stop "for"

CryLog(searchingItem);
};
}
}
//

Who is online

Users browsing this forum: No registered users and 3 guests