[quote author="annatz" date="1319793761"]my problem andre was to create the root element.
thank you both. i will do it in that way ka510[/quote]
Sounds obvious to me that if you ask for an element to be created multiple times, then it will be. So, the solution is simply to create the opening tag for the root element once, create all the content, and then create the closing tag for the root element. And 'once' here then means: outside your loop writing away your data.