This document is archived and information here might be outdated.  Recommended version.


IXmlPropertySet2.GetAttribute Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

IXmlPropertySet2.GetAttribute Method

Returns the set of values for the specified attribute from the specified elements.

[Visual Basic .NET]
Public Sub GetAttribute ( _
    ByVal Name As String, _
    ByVal Attribute As String, _
    ByRef Value As Object _
)
[C#]
public void GetAttribute (
    string Name,
    string Attribute,
    ref object Value
);
[C++]
HRESULT GetAttribute(
  BSTR Name,
  BSTR Attribute,
  VARIANT* Value
);
[C++]

Parameters Name [in] Name is a parameter of type BSTR Attribute [in] Attribute is a parameter of type BSTR Value [out] Value is a parameter of type VARIANT

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The Name parameter determines the location of the XML element.

Because XML elements may contain multiple attributes/value pairs, the Attribute parameter is used to specify the attribute.

The Value argument is returned containing the attribute values.

Remarks

The GetAttribute method returns the attribute value of the specified metadata element.

The Name parameter uses XPath to describe the location and condition of XML nodes in metadata. More information on XPath can be found at the IXmlPropertySet documentation.

The Attribute must contain a valid string. If no string is declared (""), a run time error will occur.  

See Also

IXmlPropertySet2 Interface