> you forgot to test and break if next is None > > while 1: > print walker.currentNode.getAttribute("file") > next = walker.nextNode() > if next is None: break > > See: http://pyxml.sourceforge.net/topics/howto/node22.html
I understand that adding a break is maybe less confusing. But if you test the file, you will notice that it won't parse the XML file all the way. Executing the script that I have sent, results in the following output: ./mail.py geneelior.mpg presse.mpg meteo_eliorv2.mpg meteo_elior.mpg sport_eliorv2.mpg apprendrekiteboardwavemasters1.mpg apprendrekiteboardwavemasters2.mpg apprendrekiteboardwavemasters3.mpg apprendrekiteboardwavemasters4.mpg apprendrekiteboardwavemasters5.mpg apprendrekiteboardwavemasters6.mpg freestyle_wavemaster2004_1.mpg freestyle_wavemaster2004_2.mpg surfchataineliorpromo1.mpg surfchataineliorpromo2.mpg But as you can see, it stops at "surfchataineliorpromo2.mpg". But if you look in the XML file, you will notice that almost half of the XML file is missing. So why does it stops here ? That's my point. Any idea ? Best regards, -- Alexandre CONRAD - TLV Research & Development tel : +33 1 30 80 55 05 fax : +33 1 30 80 55 06 6, rue de la plaine 78860 - SAINT NOM LA BRETECHE FRANCE _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig