Originally posted by Layale Zakhour
Hi Jim,
I'm struggling with creating an XML file according to the format below. The source is a simple file which contains Category list and the items. The source is a database table: Items which list items per category. How do I generate the XML below? For each category, I need to list the items within the list.
1- The source is a database table:
ItemID, CategoryID, ItemDesc
1,1,'Printer'
2,1,'Scanner'
3,2,'Laptop'
4,2,'Desk'
5,2,'Chair'
2- The target is an XML file which should be formatted based on the below:
<Root>
<CategoryID ID="1">
<Items>
<Item ID="1">Printer</Item>
<Item ID="2">Scanner</Item>
<Item ID="3">Laptop</Item>
</Items>
</CategoryID>
<CategoryID ID="2">
<Items>
<Item ID="4">Desk</Item>
<Item ID="5">Chair</Item>
</Items>
</CategoryID>
</Root>
Just give me hints please and I'll be grateful.