I was doing an xml reader class and I know I'm doing something terribly wrong, here is my code:
Code: Select all
#include "XMLReader.h"
IXMLReader* xml;
void createXMLReader(IrrlichtDevice* device, c8* filename)
{
xml = device->getFileSystem()->createXMLReader(filename);
}
stringw XMLReader::readXMLFile(stringw element, stringw attribute)
{
while(xml && xml->read())
{
switch(xml->getNodeType())
{
case EXN_ELEMENT:
{
if(element == xml->getNodeName())
{
return xml->getAttributeValue(attribute);
}
}
}
break;
}
}
thx, after-life