A string containing the qualified name of the current node or, for node types that do not have a name (like Text, Comment , and so on), string.Empty.
The qualified name is equivalent to the XmlReader.LocalName prefixed with XmlReader.Prefix and the ':' character. For example, XmlReader.Name is "bk:book" for the element <bk:book>.
The name returned is dependent on the XmlReader.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". |
This property is read-only.