Share via


getAttribute Method (Windows Embedded CE 6.0)

1/6/2010

Retrieves the value of the attribute.

Script Syntax

            objValue = oXMLDOMElement.getAttribute(name);

Remarks

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

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

Ee502068.collapse(en-US,WinEmbedded.60).gifScript 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.

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

HRESULT getAttribute(
  BSTR name,
  VARIANT* value
);

Remarks

Ee502068.collapse(en-US,WinEmbedded.60).gifC/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.

Ee502068.collapse(en-US,WinEmbedded.60).gifC/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.

Ee502068.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

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

Reference

XML DOM Methods

Concepts

getNamedItem Method