|Here's the script:|
f = open("Myfile.xml", "r")
line = f.readlines()
xmllist = ['Return1', 'Return2']
linematch = 
#Appending lines that matched with values from 'xmllist'
for l in line:
for x in xmllist:
if x in l:
#Stripping the first appended line linematch
trim = linematch
trim = trim.split('<')
#Stripping the second appended line from linematch
FirstValue = linematch.split('>').split('<')
The problem is when I print trim I see that that the script
doesn't read the rest of the file when it finds a newline. I have
tried the script with a file that doesn't have newline and it
works well. I don't know how to get it to work with '/n'. Any
help would be greatly appreciated.
Judago, I will definitely give your suggestion a try. Judago and
nbrane, thank you both for your time.