Forum Discussion

jg0888's avatar
jg0888
Contributor
7 years ago

How can I datasink all the values of a given parent when they have the same name?

I am currently trying to run a Data Source loop test that will pull multiple child values from one parent value:

 

Example: 

<employeeList>
<employeeId>Z62376</employeeId>
<employeeId>Z37464</employeeId>
<employeeId>Z37104</employeeId>
<employeeId>Z32160</employeeId>
<employeeId>Z30336</employeeId>
<employeeId>Z30312</employeeId>
<employeeId>Z30288</employeeId>
<employeeId>Z30264</employeeId>
<employeeId>Z30240</employeeId>
<employeeId>Z30216</employeeId>
<employeeId>Z30192</employeeId> 

</employeeList>

 

Is this possible to iterate through each of these employeeId values to then search based on each one with a different method?

 

Thanks for any help you can provide!

  • Lucian's avatar
    Lucian
    Community Hero

    Hey,

     

    Doesn't it work out of the box with the XML Datasource?

    • jg0888's avatar
      jg0888
      Contributor

      It works if I know how many employeeIds will be returned, and I create a property for each. I was just hoping there was a way to retreive all the information without creating a property for each column. (See attachment)

       

      Also, I tried using a wildcard for the "Column XPaths:" but it would not return any values.

      • richie's avatar
        richie
        Community Hero
        Hey!

        I had a similar situation recently and i just created a large number of properties to get around this which is NOT an efficient, rigorous way of doing it. So if anyone knows an approach to handle this in a more rigorous approach i'd be very grateful!

        Cheers,

        Richie