Export (0) Print
Expand All

XmlReader.Name Property

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

[Visual Basic]
Public MustOverride ReadOnly Property Name As String
[C#]
public abstract string Name {get;}
[C++]
public: __property virtual String* get_Name() = 0;
[JScript]
public abstract function get Name() : String;

Property Value

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.

Example

See Name (in the XmlTextReader class) for a sample using this method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlReader Class | XmlReader Members | System.Xml Namespace

Show:
© 2014 Microsoft