<channel>
<title>test + test</title>
<link>http://testprog.test.net/api/test</link>
<description>test.com</description>
<category>test + test</category>
<item xml:base="http://test.com/test.html?id=25>
<guid isPermaLink="false">25</guid>
<link>http://test.com/link.html</link>
<title>title test</title>
<description>Description test description test</description>
<a10:updated>2015-05-26T10:23:53Z</a10:updated>
<enclosure type="" url="http://test.com/test/test.jpg" width="200" height="200"/>
</item>
</channel>
我提取此标记(职称考试)是这样的:
title = ds.Tables["item"].Rows[0]["title"] as string;
如何从<encosure>
标签用C#中提取url属性?
THX
能否请您澄清 - 你如何显示'ds.Tables ...'这段代码与你显示的xml有关?它与一些'DataTable'有关,不是xml,我想。 –
创建两个类(通道和项目),向成员(属性或元素)添加适当的xml标签并反序列化对象 –