Mono Class Library: System.Xml.XmlTextReader Overview | Members

System.Xml.XmlTextReader.GetAttribute Method

Returns the value of the attribute with the specified qualified name.

public override string GetAttribute (string name)

Parameters

name
A string specifying the qualified name of the attribute.

Returns

A string containing the value of the specified attribute, or null if the attribute is not found. If name is null, null is returned.

Remarks

This method does not move the reader.

Note:

If the reader is positioned on a DocumentType node, this method can be used to get the PUBLIC and SYSTEM literals.

This method overrides XmlReader.GetAttribute(string).

Example

See the XmlTextReader.GetAttribute(int)(String, String) method for an example using all three overloads of this method.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0