may be you can add this funcation to the TiXmlNode class:
bool TiXmlNode::DeleteThis()
{
TiXmlNode *node =this;
TiXmlNode *fparent =node->Parent();
return fparent->RemoveChild(node);
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Im a newbie with TinyXml, and I have a file that I wish to remove a specific child by name.
The following code is removing the nextSiblingElement.
node = usersElement->FirstChild( "User" );
userElement = node->NextSiblingElement( );
usersElement->RemoveChild( userElement );
Is it possible to remove the child by using an attribute "name"?
may be you can add this funcation to the TiXmlNode class:
bool TiXmlNode::DeleteThis()
{
TiXmlNode *node =this;
TiXmlNode *fparent =node->Parent();
return fparent->RemoveChild(node);
}