How to skip all XElement attributes and get their values?
foreach (SyndicationElementExtension extension in f.ElementExtensions) { XElement element = extension.GetObject<XElement>(); // How to loop through all its attributes and get their values? }
Thanks!
Simple - use the Attributes() method:
Attributes()
foreach (var attribute in element.Attributes()) { string value = attribute.Value; // ... }
Assuming you want an answer to this question
var img2 = feeds.Items .SelectMany(i => i.ElementExtensions .Select(e => e.GetObject<XElement>().Attribute("url").Value) ) .ToArray();
Source: https://habr.com/ru/post/915431/More articles:Creating two LinearLayouts has 50% of the screen without using layout_weight - androidContactsContract how to list all available fields? - androidHow can I verify that a webpage returns 404/500 using PhantomJS? - javascriptChange background color ActionBarSherlock programmatically - androidHow the kernel determines the sequence of __init calls - linux-kernelHow to get all possible image URLs from an RSS feed item? - c #Forests in Windows 8 - windows-8How to start CSS3 animation in a specific place? - javascriptHow to reduce clang_complete search time through boost - boostRearranging the position of elements in an array in java? - javaAll Articles