System::Xml::XmlElement::SetAttributeNode method

XmlElement::SetAttributeNode(SharedPtr<XmlAttribute>) method

Adds the specified XmlAttribute.

virtual SharedPtr<XmlAttribute> System::Xml::XmlElement::SetAttributeNode(SharedPtr<XmlAttribute> newAttr)
ParameterTypeDescription
newAttrSharedPtr<XmlAttribute>The XmlAttribute node to add to the attribute collection for this element.

ReturnValue

If the attribute replaces an existing attribute with the same name, the old XmlAttribute is returned; otherwise, nullptr is returned.

See Also

XmlElement::SetAttributeNode(String, String) method

Adds the specified XmlAttribute.

virtual SharedPtr<XmlAttribute> System::Xml::XmlElement::SetAttributeNode(String localName, String namespaceURI)
ParameterTypeDescription
localNameStringThe local name of the attribute.
namespaceURIStringThe namespace URI of the attribute.

ReturnValue

The XmlAttribute to add.

See Also