This documentation is archived and is not being maintained.

XmlReader.GetAttribute Method

When overridden in a derived class, gets the value of an attribute.

Overload List

When overridden in a derived class, gets the value of the attribute with the specified index.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public MustOverride Function GetAttribute(Integer) As String
[C#] public abstract string GetAttribute(int);
[C++] public: virtual String* GetAttribute(int) = 0;
[JScript] public abstract function GetAttribute(int) : String;

When overridden in a derived class, gets the value of the attribute with the specified Name.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public MustOverride Function GetAttribute(String) As String
[C#] public abstract string GetAttribute(string);
[C++] public: virtual String* GetAttribute(String*) = 0;
[JScript] public abstract function GetAttribute(String) : String;

When overridden in a derived class, gets the value of the attribute with the specified LocalName and NamespaceURI.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public MustOverride Function GetAttribute(String, String) As String
[C#] public abstract string GetAttribute(string, string);
[C++] public: virtual String* GetAttribute(String*, String*) = 0;
[JScript] public abstract function GetAttribute(String, String) : String;

Example

See GetAttribute (in the XmlTextReader class) for an example using this method.

See Also

XmlReader Class | XmlReader Members | System.Xml Namespace

Show: