So I want to write to a file instead of printing to the screen. I'm having trouble with doing that with python 2.7.
Here is my script:
from xml.dom import minidom
import sys
import os
xmldoc = minidom.parse('c:/Python27/file.xml')
itemlist = xmldoc.getElementsByTagName('User')
for s in itemlist:
print (s.attributes['name'].value)
This actually prints out perfectly I just need it to print to a file. I'm sort of running into some issues.