GetAttribute()

XmlReader::GetAttribute(String) method

When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get_Name value.

virtual String System::Xml::XmlReader::GetAttribute(String name)=0

Arguments

ParameterTypeDescription
nameStringThe qualified name of the attribute.

Return Value

The value of the specified attribute. If the attribute is not found or the value is String::Empty, nullptr is returned.

XmlReader::GetAttribute(String, String) method

When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get_LocalName and XmlReader::get_NamespaceURI values.

virtual String System::Xml::XmlReader::GetAttribute(String name, String namespaceURI)=0

Arguments

ParameterTypeDescription
nameStringThe local name of the attribute.
namespaceURIStringThe namespace URI of the attribute.

Return Value

The value of the specified attribute. If the attribute is not found or the value is String::Empty, nullptr is returned. This method does not move the reader.

XmlReader::GetAttribute(int32_t) method

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

virtual String System::Xml::XmlReader::GetAttribute(int32_t i)=0

Arguments

ParameterTypeDescription
iint32_tThe index of the attribute. The index is zero-based. (The first attribute has index 0.)

Return Value

The value of the specified attribute. This method does not move the reader.

See Also