XElement x = ...;
var hrefs =from element in x.Descendants("a") let href=(string)element.Attribute("href") where !String.IsNullOrWhitespace(href) select href;
You can select the element if you prefer.
XElement x = ...;
var hrefs =from element in x.Descendants("a") let href=(string)element.Attribute("href") where !String.IsNullOrWhitespace(href) select href;
You can select the element if you prefer.