io - Python readlines not separating lines -


i have xml file page shows correctly on text editor once use readlines(), 1 line. assume means line separator being used isn't recognized python gedit.

i want split() on data correctly how can see line separator being used in file?

as pointed out in comments, if it's xml, hand xml parser elementtree or lxml. newlines shouldn't matter in xml.

for information, using open("thefile.xml", "ru") open universal newline support, python recognise \n, \r or \r\n newline markers.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -