Path: redb-route/redb.Route/Expressions/XPathResult.cs Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Expressions/XPathResult.cs ---- namespace redb.Route.Expressions; /// /// The type an XPath expression produces, at the XPath level. /// /// /// /// This is a different question from the CLR type the caller wants back. XPath 1.0 has four types /// of its own — node-set, string, number, boolean — and an expression produces one of them before /// .NET conversion is even considered. XPath("/order/total", XPathResult.Number) says "read /// this the way XPath's number() reads it"; XPath<int>("/order/total") says /// "give me the result as an ". The two compose, and either can be used alone. /// /// /// The distinction matters most in a condition, where the default asks /// whether the path matched anything at all, while asks what the match says. /// Apache Camel draws the same line, as resultQName against resultType. /// /// public enum XPathResult { /// /// Every matching node (the default, and XPath's own default). In a condition a node-set is /// true when it is non-empty, whatever the matched nodes contain. /// NodeSet, /// /// The first matching node in document order, or nothing. In a condition it reads as /// "a node was found". /// Node, /// /// XPath's string() of the result: the text of the first matching node, or an empty /// string when nothing matched. The value is then read by the ordinary DSL rules, so in a /// condition "0" is false — the same as a header holding "0". /// String, /// /// XPath's number() of the result, as a . Text that is not a number /// yields . /// Number, /// /// XPath's boolean() of the result: a non-empty node-set, a non-empty string and a /// non-zero number are true. /// Boolean }