irrXML help please?
Posted: Thu Dec 15, 2005 8:38 pm
Hi, I have an XML file that looks like this:
<Environment>
<Viewport Color="0,128,192" Fov="0" NearClip="-0.000000" FarClip="0.000000" />
</Environment>
How do I get the pointer to child node? I have this so far syntax but it seems not to work:( Thank u.
while(xml && xml->read()) {
If (xml->GetNodeName()=="Environment") {
If (xml->GetNodeName()=="Viewport") {
std::string EnvColor = xml->getAttributeValue("Color");
std::string EnvFov = xml->getAttributeValue("Fov");
std::string EnvNearClip = xml->getAttributeValue("NearClip");
std::string EnvFarClip = xml->getAttributeValue("FarClip");
}
}
}
<Environment>
<Viewport Color="0,128,192" Fov="0" NearClip="-0.000000" FarClip="0.000000" />
</Environment>
How do I get the pointer to child node? I have this so far syntax but it seems not to work:( Thank u.
while(xml && xml->read()) {
If (xml->GetNodeName()=="Environment") {
If (xml->GetNodeName()=="Viewport") {
std::string EnvColor = xml->getAttributeValue("Color");
std::string EnvFov = xml->getAttributeValue("Fov");
std::string EnvNearClip = xml->getAttributeValue("NearClip");
std::string EnvFarClip = xml->getAttributeValue("FarClip");
}
}
}