下面是我的 XML 示例:
<Customers>
<Customer Id="1" Name="abc"/>
<Customer Id="2" Name="efg"/>
</Customers>
如何使用 XElement 在此 XML 中更新?
<Customer Id="1" Name="aaabbbccc"/>
以及如何在这个 xml 中添加新行?
<Customers>
<Customer Id="1" Name="abc"/>
<Customer Id="2" Name="efg"/>
<Customer Id="3" Name="test"/>
</Customers>
而且,如何获得指定的名称?例如,如果 1 则 abc,如果 2 则 efg
抱歉,我不知道,XML 和 XElement 的新手。