"Sbaush" wrote:

> in the elementtree implementation the tostring function doesn't work with a
> tree, work only with an element. What is the way to put the tree in a
> string?

this is the code you posted:

    root = ET.Element("manager")
    ... snip ...

    tree = ET.ElementTree(root)
    tree.write(sys.stdout)
    print

if you need the root variable instead of the tree variable, use root instead of 
tree.

or read the ET documentation; it explains how to get the root from a tree:

    http://effbot.org/zone/element-index.htm#usage
    http://effbot.org/zone/pythondoc-elementtree-ElementTree.htm

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to