Skip to Content
1
Jun 25, 2018 at 11:28 AM

Selecting multiple values in content modifiers

1186 Views

Hi Experts,

I am trying to form the "Exchange Property" in Content Modifier which selects the values of a particular field in multiple nodes by using XPATH as type. But when I get the value of this property in groovy script or in another Content Modifier, I only get the first node value and the rest of the values in the successive nodes are ignored.

Input XML:

<?xml version="1.0" encoding="UTF-8"?> <User> <Records> <ID>1</ID> </Records> <Records> <ID>2</ID> </Records> <Records> <ID>3</ID> </Records> <Records> <ID>4</ID> </Records> </User>

Sample XPATH used in first Content Modifier to form the Exchange Property "ID" is :

p2:User/Records/ID/

Note: This XPATH is automatically selected in the Content Modifier.

I am trying to access the Exchange Property as below:

Groovy Script : message.getProperty("ID");

Content Modifier : ${property.ID}

Please let me know your suggestions

Regards,

Ahmed.