Share via


setNamedItem Method (Windows Embedded CE 6.0)

1/6/2010

Adds the supplied node to the collection.

Script Syntax

var objXMLDOMNode = oIXMLDOMNamedNodeMap.setNamedItem(newItem);

Remarks

Ee502357.collapse(en-US,WinEmbedded.60).gifScript Parameters

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

Ee502357.collapse(en-US,WinEmbedded.60).gifScript Return Value

Object. Returns the attribute successfully added to the collection.

Ee502357.collapse(en-US,WinEmbedded.60).gifC/C++ Syntax

HRESULT setNamedItem(
  IXMLDOMNode* newItem,
  IXMLDOMNode** nameItem
);

Remarks

Ee502357.collapse(en-US,WinEmbedded.60).gifC/C++ Parameters

  • newItem
    [in] Attribute to be added to the collection.
  • nameItem
    [out, retval] Attribute successfully added to the collection. If Null, no object is created.

Ee502357.collapse(en-US,WinEmbedded.60).gifC/C++ Return Values

  • S_OK
    Value returned if successful.
  • E_INVALIDARG
    Value returned if newItem is Null.
  • E_FAIL
    Value returned if an error occurs.

Ee502357.collapse(en-US,WinEmbedded.60).gifRequirements

Header msxml2.h, msxml2.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

General Remarks

If an attribute already exists with the name in IXMLDOMNode, the supplied replaces the existing attribute. The attribute name appears in its IXMLDOMNode 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.

This method applies to the following objects and interfaces:

IXMLDOMNode, and IXMLDOMNamedNodeMap.

See Also

Reference

XML DOM Methods