Hello, This is a newbie question.
While editing HTML files on Windows, ie. line ends with 0D0A, lxml adds before each end of line: ==================== #tried different things, to no avail parser = et.HTMLParser(remove_blank_text=True,strip_cdata=False) parser = et.HTMLParser(remove_blank_text=True) parser = et.HTMLParser() tree = et.parse(f,parser) root = tree.getroot() #Why adds " " before each carriage-return? #Source file is Windows, ie. 0D0A print(et.tostring(root, pretty_print=True)) #NO DIFF print(et.tostring(root, pretty_print=True).decode()) ==================== For instance: </ul> </body> </html> Thank you. _______________________________________________ lxml - The Python XML Toolkit mailing list -- lxml@python.org To unsubscribe send an email to lxml-le...@python.org https://mail.python.org/mailman3/lists/lxml.python.org/ Member address: arch...@mail-archive.com