我有etree.Element
基本上看起来像<Root></Root>
。
我想插入一堆来自children = dicttoxml(dict, root=False)
的子元素。
后者给了我一些没有父母的元素,所以基本上做print children
给了我这个:
<Child1></Child1>
<Child2></Child2>
<Child3></Child3>
<Child4></Child4>
我想将children
插入我的根etree.Element
,所以:
<Root>
<Child1></Child1>
<Child2></Child2>
<Child3></Child3>
<Child4></Child4>
</Root>