更新时间:2023-11-24 12:30:16
尝试类似的事情
top <- xmlNode(xmlName(xmltop))
for(i in 1:5) top <- addChildren(top, xmltop[[i]])
saveXML(top, file="out.xml")
file.show("out.xml")
所以我创建了一个名为 top 的 xmlNode 并在保存之前添加了一些子节点.我想这不是最优雅的方式,但现在它有效了.
So I created an xmlNode named top and added some children before saving it. I suppose it is not the most elegant way to do that but now it works.
希望能帮到你,
亚历克斯