I try to set an attribute in a XML node using MSXML. IXMLDOMElement alone has the member function setatrribute. So i got the document element.
pXMLDocumentElement->get_documentElement(&pElement);
pElement->selectSingleNode(nodePathString,&pNode);
.
.
.
pElement->setAttribute(bstr,var);
I selected the required node inwhich the attribute has to be set using selectsinglenode funcion. after selecting the required node, i tried to set attribute.
But the PElement pointer doesnot shift to the required node. it stayed on the root node. Result: added the attribute in root itself
Is ther any way, I can shift my PElement to the node resulted in selectsinglenode function. so that i can set the attribute,.