Click to return to the XML (Extensible Markup Language) home page    
IXMLDOMElement::getAttrib...     IXMLDOMElement Interface    
Web Workshop  |  XML (Extensible Markup Language)

IXMLDOMElement::getAttribute Method


Retrieves the value of the named attribute.

Visual Basic Syntax

strValue = oXMLDOMElement.getAttribute(name)

C/C++ Syntax

HRESULT getAttribute(
    BSTR name,
    VARIANT *value);

Parameters

name
[in] Name of the attribute to return.
value
[out] 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 returning null. 
E_INVALIDARG
Value returned if name is null.

Remarks

Another way to retrieve attributes is to use the IXMLDOMNamedNodeMap object's getNamedItem method.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.