tee chwee liong wrote:

> thanks for your reply. seems that xml doesnt accept a space in between.
> anyway, the output generated is:
> 
> - <Test>
> 
> 
> - <Default_Config Port="8">
> 
> 
>   <LINK>2</LINK>
> 
>   <Target_Speed>3</Target_Speed>
>   </Default_Config>
>   </Test>
>  
> it overwrites every time the port number is incremented and only capture
> the last iteration number. how can i modify it to capture all the
> iteration? 

Do you want them all in one file? Move the code to create the root element 
and the code to write the file out of the loop.

Do you want to write multiple files? Use a different name from every file.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to