.

using XElement from Xml.Linq

this example retrieves a weather report 

var xroot = XElement.Load("http://www.weather.gov/data/current_obs/KHLC.xml");
var d = (string)xroot.Element("image").Element("url");
var wind = (string)xroot.Element("wind_mph");
Image x = new Image();
x.ImageUrl = d;
this.Controls.Add(x);
Literal xx = new Literal();
xx.Text = wind + " MPH wind";
this.Controls.Add(xx);

 

see also:

        

var photos = (from p in xroot.Element("widgets").Elements("url")
            select p  ) ;
            foreach (XElement xx in photos)
            {
            Widget ss = new Widget();
            ss.Url = (string)xx;
           ...

 

and … 

List<Pagewidget> already = P.GetPageWidgetList();
            var alreadyonpage = (from q in already where q.Pageid == pageno select q);

What's your thoughts on this?

*

Protected by WP Anti Spam