有一个
xpath-expression-ref
ISNTEAD:
<xsd:attribute name="xpath-expression-ref" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Reference to the XPathExpression instance to be evaluated against the input Message's payload.
Either this or 'xpath-expression' must be provided, but not both.
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.xml.xpath.XPathExpression"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
所以,你可以配置一个bean:
<int-xml:xpath-expression id="xpathExpression" expression="//DCResponse/sdate"
ns-prefix="ns2" ns-uri="http://bgs.beienst.kl/tm/"/>