xmlunit-core : Org.XmlUnit.Diff Namespace

IDifferenceEngine Interface

XMLUnit's difference engine.

Syntax

public interface IDifferenceEngine

Remarks

Documentation for this section has not yet been entered.

Requirements

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

Members

Public Properties

[write-only]
AttributeFilter Predicate<System.Xml.XmlAttribute> . Sets the optional strategy that decides which attributes to consider and which to ignore during comparison.
[write-only]
ComparisonController ComparisonController . Determines whether the comparison should stop after given difference has been found.
[write-only]
DifferenceEvaluator DifferenceEvaluator . Evaluates the severity of a difference.
[write-only]
NamespaceContext IDictionary<string, string> . Establish a namespace context mapping from prefix to URI that will be used in Comparison.Detail.XPath.
[write-only]
NodeFilter Predicate<System.Xml.XmlNode> . Sets the optional strategy that decides which nodes to consider and which to ignore during comparison.
[write-only]
NodeMatcher INodeMatcher . Sets the strategy for selecting nodes to compare.

Public Methods

Compare (Org.XmlUnit.ISource, Org.XmlUnit.ISource)
Compares two pieces of XML and invokes the registered listeners.

Public Events

ComparisonListener Is notified of each comparison.
DifferenceListener Is notified of each comparison with outcome other than {@link ComparisonResult#EQUAL}.
MatchListener Is notified of each comparison with outcome {@link ComparisonResult#EQUAL}.

Extension Methods

static
Singleton<T> (this T) : IEnumerable<T>
An enumerable containing a single element.

Member Details

AttributeFilter Property

Sets the optional strategy that decides which attributes to consider and which to ignore during comparison.

Syntax

public Predicate<System.Xml.XmlAttribute> AttributeFilter { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Only attributes for which the predicate returns true are part of the comparison. By default all attributes are considered.

The "special" namespace, namespace-location and schema-instance-type attributes can not be ignored this way. If you want to suppress comparison of them you'll need to implement IDifferenceEngine.DifferenceEvaluator

Note that NodeMatcher will not by aware of the configured attribute filter and if its decision is based on attributes it will in general also consider attributes the filter would suppress.

Requirements

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

Compare Method

Compares two pieces of XML and invokes the registered listeners.

Syntax

public void Compare (Org.XmlUnit.ISource control, Org.XmlUnit.ISource test)

Parameters

control
the control document holding the expected content
test
the document to test

Remarks

Documentation for this section has not yet been entered.

Requirements

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

ComparisonController Property

Determines whether the comparison should stop after given difference has been found.

Syntax

public ComparisonController ComparisonController { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

ComparisonListener Event

Is notified of each comparison.

Syntax

event ComparisonListener ComparisonListener

Remarks

Documentation for this section has not yet been entered.

Requirements

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

DifferenceEvaluator Property

Evaluates the severity of a difference.

Syntax

public DifferenceEvaluator DifferenceEvaluator { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

DifferenceListener Event

Is notified of each comparison with outcome other than {@link ComparisonResult#EQUAL}.

Syntax

event ComparisonListener DifferenceListener

Remarks

Documentation for this section has not yet been entered.

Requirements

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

MatchListener Event

Is notified of each comparison with outcome {@link ComparisonResult#EQUAL}.

Syntax

event ComparisonListener MatchListener

Remarks

Documentation for this section has not yet been entered.

Requirements

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

NamespaceContext Property

Establish a namespace context mapping from prefix to URI that will be used in Comparison.Detail.XPath.

Syntax

public IDictionary<string, string> NamespaceContext { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Without a namespace context (or with an empty context) the XPath expressions will only use local names for elements and attributes.

Requirements

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

NodeFilter Property

Sets the optional strategy that decides which nodes to consider and which to ignore during comparison.

Syntax

public Predicate<System.Xml.XmlNode> NodeFilter { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Only nodes for which the predicate returns true are part of the comparison. By default nodes that are neither document types nor XML declarations are considered.

Requirements

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

NodeMatcher Property

Sets the strategy for selecting nodes to compare.

Syntax

public INodeMatcher NodeMatcher { set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

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