SetAttribute()

XmlElement::SetAttribute(String, String) method

Sets the value of the attribute with the specified name.

virtual void System::Xml::XmlElement::SetAttribute(String name, String value)

Arguments

ParameterTypeDescription
nameStringThe name of the attribute to create or alter. This is a qualified name. If the name contains a colon it is parsed into prefix and local name components.
valueStringThe value to set for the attribute.

XmlElement::SetAttribute(String, String, String) method

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

virtual String System::Xml::XmlElement::SetAttribute(String localName, String namespaceURI, String value)

Arguments

ParameterTypeDescription
localNameStringThe local name of the attribute.
namespaceURIStringThe namespace URI of the attribute.
valueStringThe value to set for the attribute.

Return Value

The attribute value.

See Also