<span class="gmail_quote"></span><font size="4">I have a xml tree like this</font> 





<pre style="font-family: courier new,monospace;">tree <span style="color: rgb(255, 0, 255);">=</span> ET.ElementTree<span style="color: rgb(255, 0, 255);">(</span>root<span style="color: rgb(255, 0, 255);">)</span></pre>
<font size="4">How can i put tree in a string?<br><br>tree is generated like this:</font><br><br><span style="font-family: courier new,monospace;">import elementtree.ElementTree as ET</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">root = ET.Element("manager")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
req=ET.SubElement(root,"request")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">app=ET.SubElement(req,"append")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">app.set("mode","INPUT")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">met=ET.SubElement(app,"method")
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">met.set("type","GOOD")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
src=ET.SubElement(app,"source")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">src.set("address","</span><a style="font-family: courier new,monospace;" onclick="return top.js.OpenExtLink(window,event,this)" href="http://127.0.0.1/" target="_blank">
127.0.0.1</a><span style="font-family: courier new,monospace;">")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">act=ET.SubElement(app,"action")</span>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">act.set("option","OK")</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">tree = ET.ElementTree(root)</span><br style="font-family: courier new,monospace;"><br>-- <br>Sbaush