Compartilhar via


getNamedItem Method (Compact 2013)

3/26/2014

Retrieves the attribute with the specified name.

Syntax

var objXMLDOMNode = oXMLDOMNamedNodeMap.getNamedItem(name);
HRESULT getNamedItem(
  BSTR name,
  IXMLDOMNode** namedItem
);

Parameters

Script

  • name
    String specifying the name of the attribute.

C/C++

  • name
    [in] Name of the attribute.
  • namedItem
    [out, retval] IXMLDOMNode object for the specified attribute. Returns Null if the attribute node is not in this collection.

Return Value

Script

Object. Returns IXMLDOMNode object for the specified attribute. Returns Null if the attribute node is not in this collection.

C/C++

  • S_OK
    Value returned if successful.
  • S_FALSE
    Value when returning Null.
  • E_INVALIDARG
    Value returned if namedItem is Null.

Remarks

This method applies to the following objects and interfaces:

IXMLDOMNamedNodeMap and IXMLDOMNode.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

XML DOM Methods