| 833 | } |
| 834 | |
| 835 | XMLNode* XMLNode::DeepClone(XMLDocument* target) const |
| 836 | { |
| 837 | XMLNode* clone = this->ShallowClone(target); |
| 838 | if (!clone) return 0; |
| 839 | |
| 840 | for (const XMLNode* child = this->FirstChild(); child; child = child->NextSibling()) { |
| 841 | XMLNode* childClone = child->DeepClone(target); |
| 842 | TIXMLASSERT(childClone); |
| 843 | clone->InsertEndChild(childClone); |
| 844 | } |
| 845 | return clone; |
| 846 | } |
| 847 | |
| 848 | void XMLNode::DeleteChildren() |
| 849 | { |
no test coverage detected