<PackageReference Include="NUnit" Version="3.0.0-alpha" />

XmlHelper

public class XmlHelper
XmlHelper provides static methods for basic XML operations
public XmlHelper()

public static void AddAttribute(XmlNode node, string name, string value)

Adds an attribute with a specified name and value to an existing XmlNode.

public static XmlNode AddElement(XmlNode node, string name)

Adds a new element as a child of an existing XmlNode and returns it.

public static XmlNode AddElementWithCDataSection(XmlNode node, string name, string data)

Adds the a new element as a child of an existing node and returns it. A CDataSection is added to the new element using the data provided.

public static XmlNode CreateTopLevelElement(string name)

Creates a new top level element node.

public static string FormatAttributeValue(string original)

Makes a string safe for use as an attribute, replacing characters characters that can't be used with their corresponding xml representations.