XPathNavigator::GetAttribute Method (String^, String^)

 

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

Namespace:   System.Xml.XPath
Assembly:  System.Xml (in System.Xml.dll)

public:
virtual String^ GetAttribute(
	String^ localName,
	String^ namespaceURI
)

Parameters

localName
Type: System::String^

The local name of the attribute. localName is case-sensitive.

namespaceURI
Type: System::String^

The namespace URI of the attribute.

Return Value

Type: System::String^

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

The XPathNavigator must be positioned on an element node before calling the GetAttribute method.

This method has no effect on the state of the XPathNavigator.

.NET Framework
Available since 1.1
Silverlight
Available since 4.0
Return to top
Show: