怎么将两个xml文件合并在一个xml文件中?
jaidy 2005-11-15 10:35:11 现在两个xml文件,文件的格式都是相似的,比如:
<?xml version="1.0" encoding="UTF-16" ?>
<inforoot informationtime="2005-11-15 14:34:15">
<iedate date="2005-11-08">
<webname mbrid="0" number="2">update.cnnic.cn:80</webname>
</iedate>
</inforoot>
现在我想新建一个xml,然后将2个xml文件的内容都复制到这个新的xml文件中,变成这样:
<?xml version="1.0" encoding="UTF-16" ?>
<root>
<inforoot informationtime="2005-11-15 14:34:15">
<iedate date="2005-11-08">
<webname mbrid="0" number="2">update.cnnic.cn:80</webname>
</iedate>
</inforoot>
<inforoot informationtime="2005-11-16 14:34:15">
<iedate date="2005-11-09">
<webname mbrid="0" number="8">www.sina.com</webname>
</iedate>
</inforoot>
</root>
请问具体该怎么做?
最好有例子或者代码提示,谢谢!