|
XmlExtensionsSetAttributeValue Method
|
Safely sets an XML node's attribute.
Namespace: GSF.XmlAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.230-beta+03417d7b5cff037b24e882d7adef82d359b34964
Syntaxpublic static void SetAttributeValue(
this XmlNode node,
string name,
string value
)
<ExtensionAttribute>
Public Shared Sub SetAttributeValue (
node As XmlNode,
name As String,
value As String
)
public:
[ExtensionAttribute]
static void SetAttributeValue(
XmlNode^ node,
String^ name,
String^ value
)
[<ExtensionAttribute>]
static member SetAttributeValue :
node : XmlNode *
name : string *
value : string -> unit
GSF.Xml.XmlExtensions.SetAttributeValue = function(node, name, value);
View SourceParameters
- node XmlNode
- An XmlNode node to operate on.
- name String
- A String indicating the node name to use.
- value String
- A String value to set the node attribute's value to.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
XmlNode. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
RemarksIf you assign a value to an attribute that does not exist, the attribute will be created.
See Also