Share via


setAttributeNode Method

Sets or updates the supplied attribute node on this element.

var objXMLDOMAttribute = oXMLDOMElement.XMLDOMElement(DOMAttribute);

HRESULT setAttributeNode(
  IXMLDOMAttribute* DOMAttribute,
  IXMLDOMAttribute** attributeNode
);

General Remarks

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.

This method applies to the following objects and interfaces:

IXMLDOMElement.

See Also

namespaceURI Property

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.