Mono Class Library: System.Xml.XmlReader Overview | Members

System.Xml.XmlReader.Name Property

Gets the qualified name of the current node. [Edit]

public virtual string Name { get; }

Value

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. [Edit]

Remarks

Operation

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 TypeName
AttributeThe name of the attribute.
DocumentTypeThe document type name.
ElementThe tag name.
EntityReferenceThe name of the entity referenced.
ProcessingInstructionThe target of the processing instruction.
XmlDeclarationThe literal string "xml".

This property is read-only.

Note to Inheritors
This property must be overridden in order to provide the functionality described above, as there is no default implementation.

[Edit]

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0