<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>
Как извлечь атрибут из тега xml с помощью C#?
Я извлек этот тег (название тесты), как это:
title = ds.Tables["item"].Rows[0]["title"] as string;
как извлечь URL-адрес из атрибута <encosure>
тега с C#?
ТНХ
Не могли бы вы уточнить, - как этот код, который вы показали «ds.Tables ...», связан с xml, который вы показали? Это связано с некоторыми «DataTable», а не с xml, я полагаю. –
создать два класса (канал и элемент), добавить соответствующие теги xml членам (атрибуту или элементу) и десериализовать объект –