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)

public virtual string Name { get; }

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.

Show: