XPath Support in Spring Web Services
Following up on my post on WS-DuckTyping, I thought it would be interesting to show what support Spring Web Services offers for XPath. Some of these features are available right now, but most will be part of the RC1 release we will release later this month. Throughout this post I will be using the contacts xml file defined in item 35 of Effective XML, by Rusty Harold.
XPathExpression
One of the options that has been available for quite a while is the XPathExpression. This is an abstraction over compiled XPath expressions, such as the Java 5 XPathExpression, and Jaxen XPath.Recently, I've added the XPathExpressionFactoryBean, to make it easier to inject XPath expressions into your beans, like so:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/200…