I'm wondering why the CopyTo method in TiXmlElement is protected. I need it because I just updated to the latest version and noticed that InsertEndChild requires a reference now instead of a pointer like it used to (or perhaps I hacked in my own version before). In order to convert from a pointer to a reference I need the CopyTo function.
I'm wondering why the CopyTo method in TiXmlElement is protected. I need it because I just updated to the latest version and noticed that InsertEndChild requires a reference now instead of a pointer like it used to (or perhaps I hacked in my own version before). In order to convert from a pointer to a reference I need the CopyTo function.
TiXmlElement node(_parent->Value());
_parent->CopyTo(&node);
_doc->InsertEndChild(node);
I think you want:
TiXmlElement node = *_parent;
...make changes...
_doc->InsertEndChild( node );
lee