cancel
Showing results for 
Search instead for 
Did you mean: 

Content Modifier Xpath Data Type

gabe_f
Explorer
0 Kudos
12,047

Hi All,

I'm using a Content Modifier - Exchange Property to store data from web service service call.

Using the above example, if the ID node contains multiple values, only the first value is being retrieved. Perhaps, an SAP limitation or maybe the data type should be changed to accommodate a Node list, but no luck so far. How to retrieve a repeating node element using the Xpath expression above?

Any help will be appreciated. Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor

Hello Gabriel,

There are multiple ways to do it and below are the few.

1) Using Content Modifier.

Input XML:

<Root>
	<Record>
		<Name2>Ravi</Name2>
		<ID>B3</ID>
	</Record>
	<Record>
		<Name2>Rohit</Name2>
		<ID>B1</ID>
	</Record>
	<Record>
		<Name2>Ram</Name2>
		<ID>B2</ID>
	</Record>
	<Record>
		<Name2>Shyaam</Name2>
		<ID>B5</ID>
	</Record>
</Root>

Condition:

 string-join(/Root/Record/ID, ",")

2) Using Groovy Script:

Refer the below blog

https://blogs.sap.com/2016/05/09/xpath-expressions-and-groovy-script-in-hana-cloud-integration/

Regards,

Sriprasad Shivaram Bhat

gabe_f
Explorer
0 Kudos

Thank you, sriprasadshivaramabhat.

Answers (0)