Class CompiledXPathExpression
An XPath expression whose path is computed per message, delegating the evaluation itself
to .
public class CompiledXPathExpression : Expression, IExpression
Inheritance
Implements
Inherited Members
Methods
Evaluate<T>(IExchange)
Evaluates the dynamic XPath expression against the exchange.
public override T Evaluate<T>(IExchange exchange)
SetValue(IExchange, object)
Sets a value in the exchange according to this expression's semantics.
public override void SetValue(IExchange exchange, object value)
ToTemplateString()
Serializes this expression to a ${...} template string suitable for URI parameters.
public override string ToTemplateString()
Constructors
CompiledXPathExpression(Func<IExchange, object>)
Initializes a new instance of the class.
Remarks
The ordinary case is a fixed path over a varying document. This is the other one: a route that
decides which path to run from the message — a rule id in a header, a per-tenant selector in an
exchange property. It costs an XPath compilation per message, which is why it is a separate type
rather than the default behaviour.
Until 2026-09-03 it did not implement , so despite being public and
tested there was nowhere in the DSL to put it: every position that takes an expression takes
that interface. It now is one, which makes it usable in the value, condition, routing and stream
positions, and in the EIPs that accept an expression.