From Code Thrill weblog, I found that I need to set the expression engine to XPath
by config.setExpressionEngine(new XPathExpressionEngine());
which needs the commons-jxpath
library.
Then I can get the result using XPath like this:
config.getString("items/item[@name='cherry']/colour");