Get the values of two Data Elements with the same name

lukeliwanaglukeliwanag Posts: 29

Hi All,

I am trying to grab the values of two tags with the same. See XML structure similar below:

<Data Set> <Value>1</Value> <Value>2</Value> &lt;/Data Set>

This XML Structure comes from context

Thanks for your help

Tagged:

Comments

  • OmarROmarR Posts: 205 admin

    Hello Luke,
    What tool are you using to retrieve the values? XML databank?
    Have you tried using xpath: /DataSet/Value/text()

  • lukeliwanaglukeliwanag Posts: 29

    Hi Omar,

    Thank you for your suggestion. Another one would be these values are sometimes present sometimes not or sometimes there's only one how do we go about with that?

    Thank you

  • OmarROmarR Posts: 205 admin
    edited May 2017

    There is a great example on how to handle repeated elements with missing values in the SOAtest userguide:

    The example can also be found in the help content within the tool. Try it out and let me know if you have any questions :)

  • lukeliwanaglukeliwanag Posts: 29

    Thanks @OmarR will try this and let you know.

  • lukeliwanaglukeliwanag Posts: 29

    Hi Omar,

    How would we extract these values using Java?

Sign In or Register to comment.