cancel
Showing results for 
Search instead for 
Did you mean: 

How to get and parse xml input parameter?

Former Member
0 Kudos

Hi,

If one transaction input parameter is xml string, like as below.

<a>

<b>

<c>1</c>

<d>2</d>

</b>

<b>

<c>3</c>

<d>4</d>

</b>

</a>

If I would like to get each element (maybe by repeater action), how to do that?

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

re-attached a example.

<ARef>

<BRef>

<c>1</c>

<d>2</d>

</BRef>

<BRef>

<c>3</c>

<d>4</d>

</BRef>

</ARef>

Former Member
0 Kudos

Hi Cary,

have you already tried the repeater action you mentioned on your second example? If you feed it with something like Transaction.YourXML{/ARef/BRef}, it should work. In the repeated branch you should be able to reference the "c" and "d" nodes.

Michael

Former Member
0 Kudos

Hi,

You must convert the string into xml with necessary action block. (XML Functions --> String to XML Parser)

Then you must put a repeater after converter action and you must set Xpath expression for repeater (configuration) like below:

String_To_XML_Parser_0.Output{/ARef/BRef}

after repeater you can use values like below:

Repeater.Output{/BRef/c}

Repeater.Output{/BRef/d}

Regards.

Former Member
0 Kudos

Hi,

Thanks for your help!