这是第一个xml文件input.xml,
输入.xml:
<Mapping>
<Common>
<Apps>
<App ID = "id1">
<config key = "Format" value = "PDF"/>
</App>
<App ID = "id2">
<config key = "Logging" value = "no"/>
<config key = "ExtraLogging" value = "no"/>
</App>
</Apps>
<All>
<config key="log1" value="N"/>
</All>
</Common>
</Mapping>
需要从 input.xml 中读取并添加/删除/更新 output.xml 中的相应条目。
输出.xml:
<Mapping>
<Common>
<Apps>
<App ID = "id1">
<config key = "Format" value = "DOC"/>
</App>
<App ID = "id2">
<config key = "Logging" value = "yes"/>
</App>
</Apps>
<All>
<config key="log1" value="N"/>
</All>
</Common>
</Mapping>