Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Everyone,

i have a source XML, that I would like to convert using a XSL to a desired format.
SOURCE XML



<NewDataSet>
  <Table>
    <content_id>ID_001</content_id>
    <record_id>Value_1</record_id>
  </Table>
  <Table>
    <content_id>ID_001</content_id>
    <record_id>Value_2</record_id>
  </Table>
  <Table>
    <content_id>ID_002</content_id>
    <record_id>Value_3</record_id>
  </Table>
</NewDataSet>



Expected Result

<Results>
<Record>
<id>ID_001
</id>
<item>Value_1
</item>
<item>Value_2
</item>
</Record>
<Record>
<id>ID_002
</id>
<item>Value_3
</item>
</Record>
</Result>


What I have tried:

I am not able to iterate through the same IDs (001)
Posted
Updated 10-Apr-17 1:03am
v3

1 solution

 
Share this answer
 
Comments
swayamrath 11-Apr-17 0:00am    
thanks Richard. i have gone through that. but not able to figure out how to collate two similar ID nodes to one.

<record>
<id>ID_001

<item>Value_1

<item>Value_2



this is causing trouble.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900