[Tutor] Generating XML using Python
tee chwee liong
tcl76 at hotmail.com
Mon Apr 11 10:04:40 CEST 2011
hi Peter,
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? for eg:
Port 1
Link speed: 2
Target speed: 3
Port 2
Link speed: 2
Target speed: 3
Port 3
Link speed: 2
Target speed: 3
Port 4
Link speed: 2
Target speed: 3
Port 5
Link speed: 2
Target speed: 3
Port 6
Link speed: 2
Target speed: 3
Port 7
Link speed: 2
Target speed: 3
Port 8
Link speed: 2
Target speed: 3
thanks
tcl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110411/26db834b/attachment.html>
More information about the Tutor
mailing list