Share via


Name Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

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

Syntax

'Declaration
Public Overridable ReadOnly Property Name As String
public virtual string Name { get; }
public:
virtual property String^ Name {
    String^ get ();
}
abstract Name : string with get
override Name : string with get
function get Name () : String

Property Value

Type: System. . :: . .String
The qualified name of the current node. For example, Name is bk:book for the element <bk:book>.
The name returned is dependent on the NodeType of the node. The following node types return the listed values. All other node types return an empty string.

Node type

Name

Attribute

The name of the attribute.

DocumentType

The document type name.

Element

The tag name.

EntityReference

The name of the entity referenced.

ProcessingInstruction

The target of the processing instruction.

XmlDeclaration

The literal string xml.

.NET Framework Security

See Also

Reference

XmlReader Class

System.Xml Namespace