System.Xml.XPath.XPathNavigator.Prefix Property

When overridden in a derived class, gets the namespace prefix associated with the current node.

Syntax

public abstract string Prefix { get; }

Value

A string that represents the prefix of the current node, or String.Empty if the current node is namespace.

Remarks

The XPathNavigator.Prefix property gets the namespace prefix associated with the current node. For example, the XPathNavigator.Prefix property returns bk for the <bk:book> element. If a prefix does not exist, or the System.Xml.XPath.XPathNodeType of the current node is not XPathNodeType.Element or XPathNodeType.Attribute, the XPathNavigator.Prefix property returns 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