
This is how I cracked it, I pulled all the unique image names into an array then ran a 'For each' image name 'do while'. Sounds that simple but it took a week plus to get it right. Thanks guys, *Kennedy Nyagah Njagi Kairaria** IT Support-Applications development**,* Mobile: 254 724615232 <http://www.linkedin.com/in/kairaria> “"Don't wait until everything is just right. It will never be perfect. There will always be challenges, obstacles and less than perfect conditions. So what. Get started now. With each step you take, you will grow stronger and stronger, more and more skilled, more and more self-confident and more and more successful." - Mark Victor Hansen<http://www.quotesdaddy.com/quote/1041647/mark-victor-hansen/dont-wait-until-everything-is-just-right-it-will-never> ” Get this email app! <http://www.wisestamp.com/apps/quotes?utm_source=extension&utm_medium=email&utm_term=quotes&utm_campaign=apps> Free signature tool. <http://r1.wisestamp.com/r/landing?promo=32&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_32> CLICK HERE TO GET IT.<http://r1.wisestamp.com/r/landing?promo=32&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_32> On Wed, Oct 10, 2012 at 11:54 AM, Rad! <conradakunga@gmail.com> wrote:
The simplest way to do this is as following
1. Sort your data by batch and then by image 2. Loop through the data row by row 3. Write a series of nested loops, the outer one writing the begin tag for the batch, the next the begin tag for the image and the third the begin and end tags for name and age
On Wed, Oct 10, 2012 at 2:58 AM, Kennedy Kairaria <kenkairaria@gmail.com>wrote:
I am creating an XML where I want to export all my data from a table in conformance to a certain schema. I am using an XMLTextwriter since I also have custom tags,
The data in my table looks like:
Batch Image name age
1 1 Alfa 20
1 2 Beta 14
1 2 Theta 46
1 2 omega 9
How can get this output into this format:
<Batch name='1'>
<Image name='1'>
<fld name>Alfa</fld>
<fld age>20</fld>
</image>
<Image name='2'>
<fld name>Beta</fld>
<fld age>14</fld>
<fld name>theta</fld>
<fld age>46</fld>
<fld name>omega</fld>
<fld age>9</fld>
</image>
</Batch>
*Kennedy Nyagah Njagi Kairaria** IT Support-Applications development**, Digital Divide Data* Tel: 254 772191795 | Mobile: 254 724615232 kennedy.kairaria@digitaldividedata.com | www.digitaldividedata.com <http://www.linkedin.com/in/kairaria> “"Courage is the discovery that you may not win, and trying when you know you can lose." - Tom Krause<http://www.quotesdaddy.com/quote/389479/tom-krause/courage-is-the-discovery-that-you-may-not-win-and> ” Get this email app! <http://www.wisestamp.com/apps/quotes?utm_source=extension&utm_medium=email&utm_term=quotes&utm_campaign=apps>
Free signature tool. <http://r1.wisestamp.com/r/landing?promo=32&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_32> CLICK HERE TO GET IT.<http://r1.wisestamp.com/r/landing?promo=32&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_32>
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke