Element¶
Adds a new element with the specified name and value.
1 |
|
Parameters¶
string name
Name of the element to add.
( string | number | boolean | DateTimeOffset ) value
Value of the element. This value will be XML encoded.
Returns¶
The current XmlWriter instance, allowing for method chaining.
Remarks¶
This method creates a new element with the specified name and value as a child of the current element.
The value is encoded using XML encoding rules to ensure proper formatting and prevent potential security issues.
Example¶
1 2 3 4 |
|