I will delete a child in the main Group.
My problem is that i must search the attribute with the number from Child and then i can`t use the function delete.
<Game ID="1" NAME="BG" PATH="/abc/abc" />
<Game ID="2" NAME="BF" PATH="/abc/abc" />
<Game ID="3" NAME="AB" PATH="/abc/abc" />
int Game::delete_game(int number)
std::string delete_number, new_name, new_path;
TiXmlElement *root, *a;
root = doc.RootElement();
for( a = hdoc.FirstChildElement("Game").ToElement(); a; a = a ->NextSiblingElement("Game") )
a ->Attribute("ID", &id);
if(id == number)
/*if(id > number)
a ->SetAttribute("ID", id-1);
Can you help me please.
Sry for my english i`m from Germany :D
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.