我有下面的xml
<databaseserver>
<server name="server1" serverid="1">
<databases>
<database dbid="1" dbname="db1" />
<database dbid="2" dbname="db2" />
</databases>
</server>
<server name="server2" serverid="2">
<databases>
<database dbid="1" dbname="db1" />
<database dbid="2" dbname="db2" />
</databases>
</server>
</databaseserver>
如何追加新节点
<server name="" serverid="3">
<databases>
<database dbid="" dbname="" />
</databases>
</server>
到现有的 xml,使最终输出看起来像
<databaseserver>
<server name="server1" serverid="1">
<databases>
<database dbid="1" dbname="db1" />
<database dbid="2" dbname="db2" />
</databases>
</server>
<server name="server2" serverid="2">
<databases>
<database dbid="1" dbname="db1" />
<database dbid="2" dbname="db2" />
</databases>
</server>
<server name="" serverid="3">
<databases>
<database dbid="" dbname="" />
</databases>
</server>
</databaseserver>