【发布时间】:2012-01-26 22:35:12
【问题描述】:
如何使用 C# .NET 2.0 查询 xml 文件,如下面的文件?我有 id 值,需要获取与该 id 相关的缩略图。
<root>
<categories>
<category title="decking">
<photos>
<photo id="1" smallphoto="/files/images/photogallery/thumbs/EarthwoodEvolutions1_thumb.jpg" />
<photo id="2" smallphoto="/files/images/photo-gallery/thumbs/XLM401_thumb.jpg" />
</photos>
</category>
</categories>
</root>
【问题讨论】: