Loops array and create XML objects from each item

(had no luck with this so im posting here…hope someone can help :D)
Hey Guys,
IM trying to loops through an array to create an XML object for each item…I dont seem to be able to nail the syntax though!

The code Im using is below…can anyone help?
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000]var[/COLOR] sections:[COLOR=#0000FF]Array[/COLOR] = [COLOR=#000000][[/COLOR][COLOR=#FF0000]“newsXML”[/COLOR],[COLOR=#FF0000]“showsXML”[/COLOR][COLOR=#000000]][/COLOR];

[COLOR=#0000FF]for[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]var[/COLOR] i:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#000080]0[/COLOR]; i < sections.[COLOR=#0000FF]length[/COLOR]; i++[COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
[COLOR=#000000]var[/COLOR] tempObj+[COLOR=#FF0000]""[/COLOR]+i:[COLOR=#0000FF]XML[/COLOR] = [COLOR=#000000]new[/COLOR] [COLOR=#0000FF]XML[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]