Exemplo n.º 1
0
//---------------------------------------------------------
bool ofxXmlSettings::readTag(const string&  tag, TiXmlHandle& valHandle, int which){

	vector<string> tokens = tokenize(tag,":");

	TiXmlHandle tagHandle = storedHandle;
	for(int x=0;x<(int)tokens.size();x++){
		if(x == 0)tagHandle = tagHandle.ChildElement(tokens.at(x), which);
		else tagHandle = tagHandle.FirstChildElement( tokens.at(x) );
	}

	// once we've walked, let's get that value...
	valHandle = tagHandle.Child( 0 );
    return (valHandle.ToText() != NULL);
}