Re: xml.dom won't traverse the whole XML tree

Alexandre CONRAD <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
Hello,

I have found out that this problem comes from a possible bad version of
pyxml. I was using the standard python + xml package comming with RH9. I
tryied the script on my windows machine and it worked. So I've installed
PyXML 0.8.4, and it works fine now...

Humpf... I thought my syntax was wrong. I was getting crazy...

Regards,

Alexandre CONRAD wrote:

>>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



---------------------------------------------------------------------------------------------------
Texte inséré par Panda Platinum 2005 Internet Security:

S'il s'agit d'un mail indésirable (SPAM), cliquez sur le lien suivant 
pour le reclasser : http://127.0.0.1:6083/Panda?ID=pav_3569&SPAM=true
---------------------------------------------------------------------------------------------------



_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.