Adds or changes the supplied attribute node on this element.
Set objXMLDOMAttribute = oXMLDOMElement.XMLDOMElement(DOMAttribute)
HRESULT setAttributeNode( IXMLDOMAttribute *DOMAttribute, IXMLDOMAttribute **attributeNode);
You cannot add an existing attribute to an element until you first remove it from its previous element. Also, you cannot add a namespace-qualified attribute when it uses the same prefix as another attribute with a different namespaceURI.
See the example given for the getAttributeNode method.