Note that there are some explanatory texts on larger screens.

plurals
  1. POXML reading problem with WP7
    primarykey
    data
    text
    <p>i'm trying to create an application with Windows Phone 7, which displays data from a specific URI, but it won't work. I'm stack,help me please. This is my XML :</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0"&gt; &lt;forecast_conditions&gt; &lt;day_of_week data="lun."/&gt; &lt;low data="28"/&gt; &lt;high data="38"/&gt; &lt;icon data="/ig/images/weather/mostly_sunny.gif"/&gt; &lt;condition data="Partiellement ensoleillé"/&gt; &lt;/forecast_conditions&gt; &lt;forecast_conditions&gt; &lt;day_of_week data="mar."/&gt; &lt;low data="27"/&gt; &lt;high data="39"/&gt; &lt;icon data="/ig/images/weather/sunny.gif"/&gt; &lt;condition data="Temps clair"/&gt; &lt;/forecast_conditions&gt; &lt;forecast_conditions&gt; &lt;day_of_week data="mer."/&gt; &lt;low data="25"/&gt; &lt;high data="38"/&gt; &lt;icon data="/ig/images/weather/mostly_sunny.gif"/&gt; &lt;condition data="Ensoleillé dans l'ensemble"/&gt; &lt;/forecast_conditions&gt; &lt;forecast_conditions&gt; &lt;day_of_week data="jeu."/&gt; &lt;low data="24"/&gt; &lt;high data="33"/&gt; &lt;icon data="/ig/images/weather/mostly_sunny.gif"/&gt; &lt;condition data="Ensoleillé dans l'ensemble"/&gt; &lt;/forecast_conditions&gt; &lt;/weather&gt; </code></pre> <p>This is my c# code:</p> <pre><code>namespace WEATHER2 { public partial class MainPage : PhoneApplicationPage { // Constructeur public MainPage() { InitializeComponent(); XDocument doc = XDocument.Load("Gweather.xml"); var x= from c in doc.Descendants("forecast_conditions") select new Weather_Element() { Day = (string)c.Attribute("day_of_week").Value, Low = (string)c.Attribute("low").Value, High = (string)c.Attribute("high").Value, Condition = (string)c.Attribute("condition").Value }; listBox1.ItemsSource = x; } public class Weather_Element { string day; string low; string high; string condition; public string Day { get { return day; } set { day = value; } } public string Low { get { return low; } set { low = value; } } public string High { get { return high; } set { high = value; } } public string Condition { get { return condition; } set { condition = value; } } } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload