System.Xml.XPath.XPathNavigator.GetAttribute Method

Gets the value of the attribute with the specified local name and namespace URI.

Syntax

public virtual string GetAttribute (string localName, string namespaceURI)

Parameters

localName
The local name of the attribute.
namespaceURI
The namespace URI of the attribute.

Returns

A string that contains the value of the specified attribute; string.Empty if a matching attribute is not found, or if the System.Xml.XPath.XPathNavigator is not positioned on an element node.

Remarks

The System.Xml.XPath.XPathNavigator must be positioned on an element node before calling the XPathNavigator.GetAttribute(string, string) method.

This method has no effect on the state of the System.Xml.XPath.XPathNavigator.

Requirements

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