lines = open('d:/songs.xml', 'r', encoding='utf-8').readlines()
songs = [ line.strip()[7:-8] for line in lines if line.find('<TITLE>')>0 ]
print('\n'.join(songs))
【 在 javame (javame) 的大作中提到: 】
: songs.xml如下,
: <SONGS>
: <TITLE>想你的三百六十五天</TITLE>
: ...................
--
FROM 58.23.245.*