xml文件追加操作
有一个xml文件
内容:
<?xml version="1.0" encoding="UTF-8"?>
<linkbase xmlns="http://www.xbrl.org/2003/linkbase"xmlns:xlink="http://www.w3.org/1999/xlink"
/>
第二个xml文件
内容:
<link:presentationLink
xlink:role="http://www.petrochina.com/role/cas/999999/999999"
xlink:type="extended" xmlns:link="http://www.xbrl.org/2003/linkbase">
</link:presentationLink>
如何把第二个xml文件写入第一个xml中,变为
<?xml version="1.0" encoding="UTF-8"?>
<linkbase xmlns="http://www.xbrl.org/2003/linkbase"xmlns:xlink="http://www.w3.org/1999/xlink"
>
<link:presentationLink
xlink:role="http://www.petrochina.com/role/cas/999999/999999"
xlink:type="extended" xmlns:link="http://www.xbrl.org/2003/linkbase">
</link:presentationLink>
</linkbase>
请个问大侠支招,不胜感激
------解决方案--------------------参考这个链接里面的添加节点方法,差不多
http://blog.csdn.net/chinajiyong/article/details/7485019