is there a way to parse an entire ElementTree from a file and return it as a string in python? I would like to read the entire file into a single string value, for example grabbing the entire output of dump(tree)? Any help or advice would be greatly appreciated!
xml
import xml.etree.ElementTree as ET
print "Enter a filename"
filename = input()
tree = ET.parse(filename)
string = tree.tostring() ##is there a way to do something like this?
test.xml
<data>
<serial>
<serial name = "serial">SN001</serial>
</serial>
<items>
<item>Test1 = Failed</item>
<item>Test2 = Passed</item>
<item>Test3 = Passed</item>
</items>
</data>