Microsoft XML 2.5 SDK


 

setNamedItem Method

[This is preliminary documentation and subject to change.]

Adds the supplied node to the collection.

Syntax

objXMLDOMNode = oXMLDOMNamedNodeMap.setNamedItem(newItem)

Parameters

newItem

Object containing the attribute to be added to the collection.

Returns

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 and notations, which are read-only.

Applies To

XMLDOMNamedNodeMap