Microsoft XML SDK 2.6 - XML Reference

setNamedItem Method

Adds the supplied node to the collection.

objXMLDOMNode = oXMLDOMNamedNodeMap.setNamedItem(newItem)

Parameters

newItem
Object containing the attribute to be added to the collection.

Return Value

Object. Returns the attribute successfully added to the collection.

Remarks

If an attribute already exists with the name in the supplied XMLDOMNode object, the supplied object replaces the existing attribute. The attribute name appears in its XMLDOMNode property.

If the newItem node type is not NODE_ATTRIBUTE, setNamedItem returns an error. For example, it is not possible to modify entities or notations, which are read-only.

See Also

Applies To: XMLDOMNamedNodeMap Object