<PackageReference Include="NUnit" Version="3.0.0-beta-3" />

TNode

public class TNode
TNode represents a single node in the XML representation of a Test or TestResult. It replaces System.Xml.XmlNode and System.Xml.Linq.XElement, providing 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 TNode FirstChild { get; }

Gets the first ChildNode

public string Name { get; }

Gets the name of the node

public string OuterXml { get; }

Gets the XML representation of this node.

public string Value { get; set; }

Gets the value of the node

public TNode(string name)

Constructs a new instance of TNode

public TNode(string name, string value)

Constructs a new instance of TNode with a value

public static TNode FromXml(string xmlText)

Create a TNode from it's XML text representation

public void AddAttribute(string name, string value)

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

public TNode AddElement(string name)

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

public TNode AddElement(string name, string value)

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

public NodeList SelectNodes(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 TNode SelectSingleNode(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 void WriteTo(XmlWriter writer)

Writes the XML representation of the node to an XmlWriter