camel:xpath. Selecting multiple values from a single node

939 views Asked by At

I want to select a multiple values from an XML node.

ex:

<Root>
  <SubRoot>
      <Parent>Hiddic</Parent>
      <Mother>Vim</Mother>
   </SubRoot>
   <SubRoot>
      <Parent>Richie</Parent>
      <Mother>Vile</Mother>
   </SubRoot>
   <SubRoot>
      <Parent>Stroog</Parent>
      <Mother>Murukku</Mother>
   </SubRoot>
</Root>

From this example i want to extract the SubRoot nodes where is equals to Vim and Vile. I am using camel Xpath expression for this. And i am giving the inputs using a properties file.

This is the code i am using:

    <setHeader headerName="newBody">
                <xpath>//SubRoot[contains(Mother,"${properties:AlgoPosition.product.type.value}")]</xpath>
    </setHeader>

The value in the property file is,

AlgoPosition,poduct.type.value = Vim,Vile;

If i give a single value in the property it retrieves me the correct node but when i give multiple values its failing. Please Help me in selecting multiple values.

0

There are 0 answers