System.Xml.XPath.XPathNavigator.Name Property

When overridden in a derived class, gets the qualified name of the current node.

Syntax

public abstract string Name { get; }

Value

A string that represents the tag name or the namespace prefix.

Remarks

The XPathNavigator.Name returned depends on the System.Xml.XPath.XPathNodeType of the current node. For example, the name for the <bk:book> element is bk:book.

The following table lists the value returned by the XPathNavigator.Name property, based on the System.Xml.XPath.XPathNodeType of the current node.

XPathNodeType.Element

The qualified name of the XPathNodeType.Element. In the following example, <bk:book>, the name of the element node is bk:book.

XPathNodeType.Attribute

The qualified name of the XPathNodeType.Attribute. In the following example, <book bk:genre='novel'>, the name of the XPathNodeType.Attribute node is bk:genre.

XPathNodeType.Namespace

The prefix associated with the namespace URI. In the following namespace declaration, xmlns:bk='urn:samples', the XPathNavigator.Name property returns bk.

XPathNodeType.ProcessingInstruction

The target of the XPathNodeType.ProcessingInstruction. In the following example, <?xml-stylesheet type='text/xsl' href= 'books.xsl'?>, the XPathNavigator.Name property returns xml-stylesheet.

All other System.Xml.XPath.XPathNodeType nodes

string.Empty.

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