I am trying to replace a fixed field name in an XML file with data. I know that I could do it the proper way using XML tools, but, this is a standard templae file that only needs one item replaced. It seems simpler to just hack a replacment.
x = open('C:\\test.xml','r')
for row in x:
print row
if 'RecCount' in row:
row.replace('RecCount','12345')
print row
I would think this would work, but for some reason it's not. Isn't the inbound row a text line in using an Open?