<PackageReference Include="NLog" Version="6.0.6" />

NLog.Layouts.XmlElement

public class XmlElement : XmlElementBase
A XML Element
public bool CDataEncode { get; set; }

Gets or sets whether output should be wrapped using CDATA section instead of XML-string escaping

public bool Encode { get; set; }

Gets or sets whether output should be encoded with XML-string escaping, or be treated as valid xml-element-value

public Layout Layout { get; set; }

Gets or sets the layout used for rendering the XML-element InnerText.

public string Name { get; set; }

Name of the element

public Layout Value { get; set; }

Value inside the element

public XmlElement()

Initializes a new instance of the XmlElement class.

public XmlElement(string elementName, Layout elementValue)

Initializes a new instance of the XmlElement class.