bool XmlParser::ReplaceNode(XmlNode nodeNew, XmlNode nodeOld) { MSXML2::IXMLDOMNodePtr pParentNode; nodeOld.GetIXMLDOMElementPtr()->get_parentNode(&pParentNode); return SUCCEEDED(pParentNode->replaceChild(nodeNew.GetIXMLDOMElementPtr(), nodeOld.GetIXMLDOMElementPtr())); }
void XmlParser::AppendNode(XmlNode root) { MSXML2::IXMLDOMElementPtr item; item = root.GetIXMLDOMElementPtr(); MSXML2::IXMLDOMElementPtr docElement = m_domDocument->documentElement; if (docElement == NULL) { m_domDocument->appendChild(item); } else { m_domDocument->documentElement->appendChild(item); } }