我都想在 C# 中加载并比较条目,如果它们不存在,请添加它们,但不应添加某些异常。
我搜索了类似的问题,但找不到解决我的问题的方法。
//NEW
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<file-manager>
<part-programs>
<mount-points>
<mount-point alias="USB (E:)">E:\</mount-point>
</mount-points>
</part-programs>
<cad-parts>
<mount-points>
<mount-point alias="Part Programs">C:\Messer\Partprogram</mount-point>
</mount-points>
</cad-parts>
</configuration>
//OLD
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<file-manager>
<part-programs>
<mount-points>
<mount-point alias="Floppy (A:)">A:\</mount-point>
<mount-point alias="USB (E:)">E:\</mount-point>
<mount-point alias="USB (F:)">F:\</mount-point>
<mount-point alias="Part Programs">C:\Messer\Partprogram</mount-point>
<mount-point alias="Programas">C:\Messer\ProgramasMaq2</mount-point>
</mount-points>
</part-programs>
<cad-parts>
<mount-points>
<mount-point alias="Floppy (A:)">A:\</mount-point>
<mount-point alias="USB (E:)">E:\</mount-point>
<mount-point alias="USB (F:)">F:\</mount-point>
<mount-point alias="Part Programs">C:\Messer\Partprogram</mount-point>
</mount-points>
</cad-parts>
</configuration>
//Should be added to NEW one
<mount-points>
<mount-point alias="USB (F:)">F:\</mount-point>
<mount-point alias="Part Programs">C:\Messer\Partprogram</mount-point>
<mount-point alias="Programas">C:\Messer\ProgramasMaq2</mount-point>
</mount-points>
<cad-parts>
<mount-points>
<mount-point alias="USB (E:)">E:\</mount-point>
<mount-point alias="USB (F:)">F:\</mount-point>
</mount-points>
</cad-parts>
//Should not be added
<mount-points>
<mount-point alias="Floppy (A:)">A:\</mount-point>
</mount-points>
<cad-parts>
<mount-points>
<mount-point alias="Floppy (A:)">A:\</mount-point>
</mount-points>
</cad-parts>