Hello all

I want to do the following in an XML file:

XFile = open(XmlFile,'r')
for line in XFile.readlines():
    if line.find('<end_time>') > 0:
      print line

However, it does not work due to extra characters that
appear in the XML file.  For example if I use the
previous code without the if condition, on a console
it looks like:
< e n d _ t i m e >
And if you output that to a text file and open that in
a text editor, the text editor shows a square instead
of a space in between every character.  What is going
on?

Thanks
Ben




                
___________________________________________________________ 
Yahoo! Photos – NEW, now offering a quality print service from just 8p a photo 
http://uk.photos.yahoo.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to