private XPathExpression getXPathExpressionFromParameters(Map<String, Object> parameters) {
String xpathExpression = getAndRemoveParameter(parameters, "expression", String.class);
if (xpathExpression == null) {
throw new RuntimeCamelException("Expression parameter is required when using XPath endpoint mapping");
}
XPathExpression expression = XPathExpressionFactory.createXPathExpression(xpathExpression);
return expression;
}