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.10.0.256

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
GetAttributes (System.Xml.XmlNode, Predicate<System.Xml.XmlAttribute>) : 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
NormalizeXmlWhitespace (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.
static
StripXmlElementContentWhitespace (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 XML whitespace.
static
StripXmlWhitespace (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 of characters XML considers whitespace according to .

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.10.0.256

GetAttributes Method

Obtains an element's attributes as dictionary.

Syntax

Parameters

n
Documentation for this section has not yet been entered.
attributeFilter
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

since XMLUnit 2.10.0

Requirements

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

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.10.0.256

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.10.0.256

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 characters are collapsed.

This method is similiar to Nodes.StripWhitespace(System.Xml.XmlNode) but in addition "normalizes" whitespace.

Unlike Nodes.NormalizeXmlWhitespace(System.Xml.XmlNode) this uses Unicode's idea of whitespace rather than the more restricted subset considered whitespace by XML.

Requirements

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

NormalizeXmlWhitespace 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 NormalizeXmlWhitespace (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 XML whitespace characters are replaced by space characters and consecutive XML whitespace characters are collapsed.

This method is similiar to Nodes.StripXmlWhitespace(System.Xml.XmlNode) but in addition "normalizes" XML whitespace.

Unlike Nodes.NormalizeWhitespace(System.Xml.XmlNode) this uses XML's idea of whitespace rather than the more extensive set considered whitespace by Unicode.

since XMLUnit 2.10.0

Requirements

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

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.

Unlike Nodes.StripXmlElementContentWhitespace(System.Xml.XmlNode) this uses Unicode's idea of whitespace rather than the more restricted subset considered whitespace by XML.

since XMLUnit 2.6.0

Requirements

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

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

Unlike Nodes.StripXmlWhitespace(System.Xml.XmlNode) this uses Unicode's idea of whitespace rather than the more restricted subset considered whitespace by XML.

Requirements

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

StripXmlElementContentWhitespace 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 XML whitespace.

Syntax

public static System.Xml.XmlNode StripXmlElementContentWhitespace (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.

Unlike Nodes.StripXmlElementContentWhitespace(System.Xml.XmlNode) this uses XML's idea of whitespace rather than the more extensive set considered whitespace by Unicode.

since XMLUnit 2.10.0

Requirements

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

StripXmlWhitespace 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 of characters XML considers whitespace according to .

Syntax

public static System.Xml.XmlNode StripXmlWhitespace (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

Unlike Nodes.StripWhitespace(System.Xml.XmlNode) this uses XML's idea of whitespace rather than the more extensive set considered whitespace by Unicode.

since XMLUnit 2.10.0

Requirements

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