// commented out while we investigate why it causes lock ups under some circumstances.
// our.apache.commons.jxpath.ri.compiler.Expression e =
// (our.apache.commons.jxpath.ri.compiler.Expression)
// Parser.parseExpression(expression, getCompiler());
XPathParser parser = new XPathParser(new StringReader(expression));
parser.setCompiler(getCompiler());
our.apache.commons.jxpath.ri.compiler.Expression e =
(our.apache.commons.jxpath.ri.compiler.Expression)
parser.parseExpression();
// return the Expression object
return new JXPathExpression(
factory,
new JXPathCompiledExpression(expression, e));