Skip to content

XmlNode.Assert

Overview

void XmlNode.Assert ( xpath, [ message ], [ detailXPath ] )
Used for error checks. Makes an assertion that specified xpath is returns a true boolean value, otherwise error is thrown.

Arguments

String xpath

XPath to evaluate as boolean.

String message

Error message to show. If not specified "Assertion Failed" standard message is used.

String detailXPath

XPath to evalute to append in error message.

Remarks

Examples

Simple Usage

$Xml.Assert("//Customer/Name = 'X'", "Invalid customer", "//Customer/Name");

See Also