GetAttribute()

XmlElement::GetAttribute(String) method

Returns the value for the attribute with the specified name.

virtual String System::Xml::XmlElement::GetAttribute(String name)

Arguments

ParameterTypeDescription
nameStringThe name of the attribute to retrieve. This is a qualified name. It is matched against the get_Name value of the matching node.

Return Value

The value of the specified attribute. An empty string is returned if a matching attribute is not found or if the attribute does not have a specified or default value.

XmlElement::GetAttribute(String, String) method

Returns the value for the attribute with the specified local name and namespace URI.

virtual String System::Xml::XmlElement::GetAttribute(String localName, String namespaceURI)

Arguments

ParameterTypeDescription
localNameStringThe local name of the attribute to retrieve.
namespaceURIStringThe namespace URI of the attribute to retrieve.

Return Value

The value of the specified attribute. An empty string is returned if a matching attribute is not found or if the attribute does not have a specified or default value.

See Also