I think you want to read the xml node attribute value, you could do like below:
if (node.Attributes != null)
{
var textAttribute = node.Attributes["text"];
if (textAttribute != null)
return textAttribute.Value;
throw new InvalidOperationException("Node 'text' not found.");
}
Member
15 Points
50 Posts
get data
Dec 17, 2015 06:44 AM|motorrevo00|LINK
<itunes:category text="Religion & Spirituality">...</itunes:category>
i want to get "Religion & Spirituality" can you help me ?
sorry for bad english
Star
12330 Points
2021 Posts
Re: get data
Dec 18, 2015 03:05 AM|Candice Zhou|LINK
Hi Kornelius,
I think you want to read the xml node attribute value, you could do like below:
Please see: https://msdn.microsoft.com/en-us/library/system.xml.xmlnode.attributes(v=vs.110).aspx
Best Regards,
Candice Zhou
Member
15 Points
50 Posts
Re: get data
Dec 18, 2015 08:16 AM|motorrevo00|LINK
use methode <%#XPath ("")%>
help me
Star
12330 Points
2021 Posts
Re: get data
Dec 21, 2015 09:26 AM|Candice Zhou|LINK
Hi Kornelius,
If you want to use Xml to get attribute value, you could refer to the following documents:
http://www.w3schools.com/xsl/xpath_syntax.asp
http://stackoverflow.com/questions/6704585/get-attribute-value-from-c-xpath
Best Regards,
Candice Zhou