GetAttribute()

XmlValidatingReader::GetAttribute(String) method

Returns the value of the attribute with the specified name.

String System::Xml::XmlValidatingReader::GetAttribute(String name) override

Arguments

ParameterTypeDescription
nameStringThe qualified name of the attribute.

Return Value

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

XmlValidatingReader::GetAttribute(String, String) method

Returns the value of the attribute with the specified local name and namespace Uniform Resource Identifier (URI).

String System::Xml::XmlValidatingReader::GetAttribute(String localName, String namespaceURI) override

Arguments

ParameterTypeDescription
localNameStringThe 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, nullptr is returned. This method does not move the reader.

XmlValidatingReader::GetAttribute(int32_t) method

Returns the value of the attribute with the specified index.

String System::Xml::XmlValidatingReader::GetAttribute(int32_t i) override

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.

See Also