xmlunit-core : Org.XmlUnit.Util Namespace

Nodes Class

Utility algorithms that work on DOM nodes.

Syntax

public static class Nodes

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Util
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

Members

See Also: Inherited members from object.

Public Methods

static
GetAttributes (System.Xml.XmlNode) : IDictionary<System.Xml.XmlQualifiedName, string>
Obtains an element's attributes as dictionary.
static
GetMergedNestedText (System.Xml.XmlNode) : string
Tries to merge all direct Text and CDATA children of the given Node and concatenates their value.
static
GetQName (this System.Xml.XmlNode) : System.Xml.XmlQualifiedName
Extracts a Node's name and namespace URI (if any).
static
NormalizeWhitespace (System.Xml.XmlNode) : System.Xml.XmlNode
Creates a new Node (of the same type as the original node) that is similar to the orginal but doesn't contain any empty text or CDATA nodes and where all textual content including attribute values or comments are normalized.
static
StripElementContentWhitespace (System.Xml.XmlNode) : System.Xml.XmlNode
Creates a new Node (of the same type as the original node) that is similar to the orginal but doesn't contain any text or CDATA nodes that only consist of whitespace.
static
StripWhitespace (System.Xml.XmlNode) : System.Xml.XmlNode
Creates a new Node (of the same type as the original node) that is similar to the orginal but doesn't contain any empty text or CDATA nodes and where all textual content including attribute values or comments are trimmed.

Member Details

GetAttributes Method

Obtains an element's attributes as dictionary.

Syntax

Parameters

n
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Util
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

GetMergedNestedText Method

Tries to merge all direct Text and CDATA children of the given Node and concatenates their value.

Syntax

public static string GetMergedNestedText (System.Xml.XmlNode n)

Parameters

n
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Util
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

GetQName Method

Extracts a Node's name and namespace URI (if any).

Syntax

public static System.Xml.XmlQualifiedName GetQName (this System.Xml.XmlNode n)

Parameters

n
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Util
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

NormalizeWhitespace Method

Creates a new Node (of the same type as the original node) that is similar to the orginal but doesn't contain any empty text or CDATA nodes and where all textual content including attribute values or comments are normalized.

Syntax

public static System.Xml.XmlNode NormalizeWhitespace (System.Xml.XmlNode original)

Parameters

original
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

"normalized" in this context means all whitespace characters are replaced by space characters and consecutive whitespace characaters are collapsed.

Requirements

Namespace: Org.XmlUnit.Util
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

StripElementContentWhitespace Method

Creates a new Node (of the same type as the original node) that is similar to the orginal but doesn't contain any text or CDATA nodes that only consist of whitespace.

Syntax

public static System.Xml.XmlNode StripElementContentWhitespace (System.Xml.XmlNode original)

Parameters

original
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

This doesn't have any effect if applied to a text or CDATA node itself.

since XMLUnit 2.6.0

Requirements

Namespace: Org.XmlUnit.Util
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121

StripWhitespace Method

Creates a new Node (of the same type as the original node) that is similar to the orginal but doesn't contain any empty text or CDATA nodes and where all textual content including attribute values or comments are trimmed.

Syntax

public static System.Xml.XmlNode StripWhitespace (System.Xml.XmlNode original)

Parameters

original
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Util
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.6.0.121