XmlElement.SetAttributeNode Method (XmlAttribute)
Assembly: System.Xml (in system.xml.dll)
The XmlAttribute node to add to the attribute collection for this element.
Return ValueIf the attribute replaces an existing attribute with the same name, the old XmlAttribute is returned; otherwise, a null reference (Nothing in Visual Basic) is returned.
The newAttr was created from a different document than the one that created this node. Or this node is read-only.
The newAttr is already an attribute of another XmlElement object. You must explicitly clone XmlAttribute nodes to re-use them in other XmlElement objects.
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.