Re: lmlx caracter

2009-10-27 Thread Christian Heimes
Toff wrote: hello i can't parse a file with lxml ?xml version=1.0 encoding=iso-8859-1 ? packages package id=firefox name=FireFox 3.5 download url=http://download.mozilla.org/? product=firefox-3.5os=winlang=fr /

Re: lmlx caracter

2009-10-27 Thread Stefan Behnel
Toff, 27.10.2009 09:15: but does my download url still allways works with replace by $amp; Sorry, my English fails to parse that. If that was a question, could you rephrase it, please? Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: lmlx caracter

2009-10-27 Thread Stefan Behnel
Toff, 27.10.2009 09:15: On 27 oct, 09:03, Christian Heimes li...@cheimes.de wrote: Toff wrote: hello i can't parse a file with lxml ?xml version=1.0 encoding=iso-8859-1 ? packages package id=firefox name=FireFox 3.5

Re: lmlx caracter

2009-10-27 Thread Toff
sorry for my english thanks again for your answer ;) i did that o = open(output.txt,w) data = open(filename).read() o.write( re.sub('(?!amp;|quot;|nbsp;|gt;|lt;|laquo;| raquo;|copy;|reg;|bul;|rsquo;)', 'amp;', data) )

Re: lmlx caracter

2009-10-27 Thread Stefan Behnel
Toff, 27.10.2009 10:14: o = open(output.txt,w) data = open(filename).read() o.write( re.sub('(?!amp;|quot;|nbsp;|gt;|lt;|laquo;| raquo;|copy;|reg;|bul;|rsquo;)', 'amp;', data) ) o.close() shutil.move