Bewerken

Delen via


XPathNavigator.GetAttribute(String, String) Method

Definition

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

public:
 virtual System::String ^ GetAttribute(System::String ^ localName, System::String ^ namespaceURI);
public:
 abstract System::String ^ GetAttribute(System::String ^ localName, System::String ^ namespaceURI);
public virtual string GetAttribute (string localName, string namespaceURI);
public abstract string GetAttribute (string localName, string namespaceURI);
abstract member GetAttribute : string * string -> string
override this.GetAttribute : string * string -> string
abstract member GetAttribute : string * string -> string
Public Overridable Function GetAttribute (localName As String, namespaceURI As String) As String
Public MustOverride Function GetAttribute (localName As String, namespaceURI As String) As String

Parameters

localName
String

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

namespaceURI
String

The namespace URI of the attribute.

Returns

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

Remarks

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.

Applies to

See also