exoteric said:Sven Groot said:*snip*Yes, good point, and it now looks rediculously simpler than the equivalent PHP, even for this small piece of code.
Actually you need to enclose the line in braces because the whole code is already inside a code block @{ }, so:
@using System.Xml.Linq @{ var xml = XDocument.Load("http://picasaweb.google.com/data/feed/base/user/114741487348646937381/albumid/5494564502704076449?kind=photo"); foreach(var node in xml.Descendants("{http://search.yahoo.com/mrss/}thumbnail")) {<img src="@node.Attribute("url").Value" /> } }
And why not post this as a comment to the original authors post to set him straight. If he isn't corrected, his point stands and people will just accept that ![]()