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

XmlNode

public class XmlNode
XmlNode represents a single node in the XML representation of a Test or TestResult. It replaces System.Xml.XmlNode and provides a minimal set of methods for operating on the XML in a platform-independent manner.

Gets the dictionary of attributes

public NodeList ChildNodes { get; }

Gets a list of child nodes

public string EscapedTextContent { get; }

Gets the text content of the node escaped as needed. This is for use in writing out the XML representation.

public XmlNode FirstChild { get; }

Gets the first child of this node, or null

public string Name { get; }

Gets the name of the node

public string OuterXml { get; }

Gets the outer XML.

public string TextContent { get; set; }

Gets the text content of the node

public XmlNode(string name)

Constructs a new instance of XmlNode

public static XmlNode CreateTopLevelElement(string name)

Creates a new top level element node.

public void AddAttribute(string name, string value)

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

public XmlNode AddElement(string name)

Adds a new element as a child of the current node and returns it.

public XmlNode FindDescendant(string xpath)

Finds a single descendant of this node matching an xpath specification. The format of the specification is limited to what is needed by NUnit and its tests.

public NodeList FindDescendants(string xpath)

Finds all descendants of this node matching an xpath specification. The format of the specification is limited to what is needed by NUnit and its tests.

public void WriteTo(XmlWriter writer)

Writes the XML representation of the node to an XmlWriter