我的 XML 数据库:
<root>
<car>
<index>1</index>
<brand>Ford</brand>
<year>2006</year>
<price>20000</price>
<mileage>70000</mileage>
</car>
</root>
有人可以告诉我如何删除整条记录吗?(index, brand,year,price,mileage) 我知道我应该使用 RemoveChild() 但我做不到。
doc.RemoveChild(doc.SelectSingleNode("//root/car/index[@='1']"));
提前谢谢各位!