Share via


getAttribute Method (Windows CE 5.0)

Send Feedback

Retrieves the value of the attribute.

[Script]

Script Syntax

objValue=oXMLDOMElement.getAttribute(name);

Script Parameters

  • name
    String specifying the name of the attribute to return.

Script Return Value

Variant. Returns a string that contains the attribute value or returns the empty string if the named attribute does not have a specified or default value.

[C/C++]

C/C++ Syntax

HRESULT getAttribute(BSTRname,VARIANT* value);

C/C++ Parameters

  • name
    [in] Name of the attribute to return.
  • value
    [out, retval] String that contains the attribute value. The empty string is returned if the named attribute does not have a specified or default value.

C/C++ Return Values

  • S_OK
    Value returned if successful.
  • S_FALSE
    Value when no attribute with the given name is found.
  • E_INVALIDARG
    Value returned if name is Null.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Msxml2.h, Msxml2.idl.
Link Library: Uuid.lib.

General Remarks

You can also retrieve attributes by using the getNamedItem method of the IXMLDOMNamedNodeMap.

This method applies to the following objects and interfaces:

IXMLDOMElement and IXMLDOMNamedNodeMap.

See Also

getNamedItem Method

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.