Прочетете на английски Редактиране

Споделяне чрез


XmlTextReader.Item[] Property

Definition

Overloads

Item[Int32]

Gets the value of the attribute with the specified index.

Item[String]

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 attribute.

Applies to

.NET Framework 1.1
Продукт Версии
.NET Framework 1.1

Item[String]

Gets the value of the attribute with the specified name.

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

Parameters

name
String

The qualified name of the attribute.

Property Value

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

Remarks

This property does not move the reader.

If the reader is positioned on a DocumentType node, this method can be used to get the PUBLIC and SYSTEM literals, for example, reader["PUBLIC"].

Applies to

.NET Framework 1.1
Продукт Версии
.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, returns null.

Applies to

.NET Framework 1.1
Продукт Версии
.NET Framework 1.1