Thanks for the response. Sorry if its a dumb question but Im not getting things clear..Please help..I have a Dom document with the following XML structure and I need to extract only those Divisions Elements which has "Change-Occured=true". Im getting confused as of how to use Message Selector here.What does it mean by using Message Filter in conjuction with Message Selector in terms of XML config?? An example would be appreciated.
My Dom Structure
Code:
<?xml version="1.0" encoding="UTF-8"?>
<div:divisionResponse xmlns:div="http://gid.com/div/schemas">
<div:Divisions Added="false" Change-Occured="false" Deleted="false" ID="1"/>
<div:Divisions Added="false" Change-Occured="false" Deleted="false" ID="32"/>
</div:divisionResponse>
How should I use Message Selector with Message Filter to achieve what I want ?? Should it be something like this:
Code:
<filter input-channel="input" ref="selector" output-channel="output"/>
<bean id="selector" class="example.MessageSelectorImpl"/>
//Do v have to provide our own implementation for this bean??
or
Code:
<filter input-channel="input" ref="selector" output-channel="output"/>
<bean id="selector"
class="org.springframework.integration.channel.interceptor.MessageSelectingInterceptor">
<constructor-arg>
<bean class="org.springframework.integration.xml.selector.BooleanTestXPathMessageSelector">
<constructor-arg value="boolean(/order)" />
</bean>
</constructor-arg>
</bean>
or
Code:
<filter input-channel="input" ref="selector" output-channel="output"/>
<si-xml:xpath-selector id="selector" evaluation-result-type="boolean" >
<si-xml:xpath-expression expression="/name"/>
</si-xml:xpath-selector>