Looping through a DTL

I have a DTL that reads an xml file and I want transform that to a list of objects but I have a problem looping through my xml as when I try I get the first instance on the xml not the whole XML being transformed. here is my example. Here is the output

 <s01:WardOccupancy>
<s01:WardOccupancy>
<Organisation>BYG</Organisation>
</s01:WardOccupancy>
</s01:WardOccupancy>
</msg>

from

<Message>
  <Record>
    <OrganisationCode>BYG</OrganisationCode>
  </Record>
  <Record>
    <OrganisationCode>BYG</OrganisationCode>
  </Record>
  <Record>
    <OrganisationCode>BYG</OrganisationCode>
  </Record>
  <Record>
    <OrganisationCode>BYG</OrganisationCode>
  </Record>
  <Record>
    <OrganisationCode>BYG</OrganisationCode>
  </Record>
</Message>

  • 0
  • 0
  • 306
  • 1
  • 0

Comentarios

Can you show the top visual view of the DTL? It seems that there should be different hierarchy.

i.e. source.Message.Record(k1).OrganizationCode