so my code is:
core::stringw AntiA,FullScr,VSync;
core::stringc Width, Height;
....
io::IXMLReader* xml2 = device->getFileSystem()->createXMLReader(
"settings.xml");
while(xml2 && xml2->read())
{
switch(xml2->getNodeType())
{
case io::EXN_TEXT:
Width = xml2->getAttributeValue(L"Width");
Height = xml2->getAttributeValue(L"Height");
FullScr = xml2->getAttributeValue(L"FullScreen");
AntiA = xml2->getAttributeValue(L"AntiAlias");
VSync = xml2->getAttributeValue(L"VSync");
break;
}
}
if (xml2)
xml2->drop();
....
param.WindowSize.Width = Width.c_str();
param.WindowSize.Height = Height.c_str();
param.AntiAlias = AntiA.c_str();
param.Fullscreen = FullScr.c_str();
param.Vsync = VSync.c_str();
and the xml file:
<settings>
Width="800"
Height="600"
AntiAlias="true"
FullScreen="false"
VSync="false"
</settings>
but still gives some errors and doesn't read the xml data
![Sad :(](./images/smilies/icon_sad.gif)
also i want to make an xml writer to write new values in settings.xml when new screen resolution is set from the options menu...and the new setting to be loaded next time the program is open.
any suggestions could be usefull
10x