XmlHelper provides static methods for basic XML operations.
More...
|
static XmlNode | CreateTopLevelElement (string name) |
| Creates a new top level element node. More...
|
|
static XmlNode | CreateXmlNode (string xml) |
|
static void | AddAttribute (this XmlNode node, string name, string value) |
| Adds an attribute with a specified name and value to an existing XmlNode. More...
|
|
static XmlNode | AddElement (this XmlNode node, string name) |
| Adds a new element as a child of an existing XmlNode and returns it. More...
|
|
static XmlNode | AddElementWithCDataSection (this 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. More...
|
|
static string | GetAttribute (this XmlNode result, string name) |
| Gets the value of the given attribute. More...
|
|
static int | GetAttribute (this XmlNode result, string name, int defaultValue) |
| Gets the value of the given attribute as an int. More...
|
|
static double | GetAttribute (this XmlNode result, string name, double defaultValue) |
| Gets the value of the given attribute as a double. More...
|
|
static DateTime | GetAttribute (this XmlNode result, string name, DateTime defaultValue) |
| Gets the value of the given attribute as a DateTime. More...
|
|
XmlHelper provides static methods for basic XML operations.
static XmlNode NUnit.Common.XmlHelper.CreateTopLevelElement |
( |
string |
name | ) |
|
|
inlinestatic |
static XmlNode NUnit.Common.XmlHelper.CreateXmlNode |
( |
string |
xml | ) |
|
|
inlinestatic |
static void NUnit.Common.XmlHelper.AddAttribute |
( |
this XmlNode |
node, |
|
|
string |
name, |
|
|
string |
value |
|
) |
| |
|
inlinestatic |
static XmlNode NUnit.Common.XmlHelper.AddElement |
( |
this XmlNode |
node, |
|
|
string |
name |
|
) |
| |
|
inlinestatic |
Adds a new element as a child of an existing XmlNode and returns it.
- Parameters
-
node | The node to which the element should be added. |
name | The element name. |
- Returns
- The newly created child element
static XmlNode NUnit.Common.XmlHelper.AddElementWithCDataSection |
( |
this XmlNode |
node, |
|
|
string |
name, |
|
|
string |
data |
|
) |
| |
|
inlinestatic |
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.
- Parameters
-
node | The node to which the element should be added. |
name | The element name. |
data | The data for the CDataSection. |
- Returns
static string NUnit.Common.XmlHelper.GetAttribute |
( |
this XmlNode |
result, |
|
|
string |
name |
|
) |
| |
|
inlinestatic |
static int NUnit.Common.XmlHelper.GetAttribute |
( |
this XmlNode |
result, |
|
|
string |
name, |
|
|
int |
defaultValue |
|
) |
| |
|
inlinestatic |
Gets the value of the given attribute as an int.
- Parameters
-
result | The result. |
name | The name. |
defaultValue | The default value. |
- Returns
static double NUnit.Common.XmlHelper.GetAttribute |
( |
this XmlNode |
result, |
|
|
string |
name, |
|
|
double |
defaultValue |
|
) |
| |
|
inlinestatic |
Gets the value of the given attribute as a double.
- Parameters
-
result | The result. |
name | The name. |
defaultValue | The default value. |
- Returns
static DateTime NUnit.Common.XmlHelper.GetAttribute |
( |
this XmlNode |
result, |
|
|
string |
name, |
|
|
DateTime |
defaultValue |
|
) |
| |
|
inlinestatic |
Gets the value of the given attribute as a DateTime.
- Parameters
-
result | The result. |
name | The name. |
defaultValue | The default value. |
- Returns
The documentation for this class was generated from the following file: