XmlNodeReader.Item[] Property

Definition

Overloads

Item[Int32]

Gets the value of the attribute with the specified index.

Item[String]

When overridden in a derived class, gets the value of the attribute with the specified name.

Item[String, String]

Gets the value of the attribute with the specified local name and namespace URI.

Item[Int32]

Gets the value of the attribute with the specified index.

C#
public override string this[int i] { get; }

Parameters

i
Int32

The index of the attribute.

Property Value

The value of the specified attribute.

Exceptions

The i parameter is less than 0 or greater than or equal to AttributeCount.

Remarks

Note

In the .NET Framework 2.0, the recommended practice is to create XmlReader instances using the XmlReaderSettings class and the Create method. This allows you to take full advantage of all the new features introduced in the .NET Framework. For more information, see the Remarks section in the XmlReader reference page.

This property does not move the reader.

See also

Applies to

.NET Framework 1.1
Product Versions
.NET Framework 1.1

Item[String]

When overridden in a derived class, gets the value of the attribute with the specified name.

C#
public override string this[string name] { get; }

Parameters

name
String

Property Value

Applies to

.NET Framework 1.1
Product Versions
.NET Framework 1.1

Item[String, String]

Gets the value of the attribute with the specified local name and namespace URI.

C#
public override string this[string name, string namespaceURI] { get; }

Parameters

name
String

The local name of the attribute.

namespaceURI
String

The namespace URI of the attribute.

Property Value

The value of the specified attribute. If the attribute is not found, null is returned.

Remarks

Note

In the .NET Framework 2.0, the recommended practice is to create XmlReader instances using the XmlReaderSettings class and the Create method. This allows you to take full advantage of all the new features introduced in the .NET Framework. For more information, see the Remarks section in the XmlReader reference page.

This property does not move the reader.

See also

Applies to

.NET Framework 1.1
Product Versions
.NET Framework 1.1