print etree.tostring(x, pretty_print=True) ... 另一种解决方案是借用这个 indent 函数,与从2.5开始就内置在python中的elementtree库一起使用。
確定! 回上一頁