Note that there are some explanatory texts on larger screens.

plurals
  1. POLinq to XML: I am not able to compare the nested element
    primarykey
    data
    text
    <p>Thank you in advance, this is a great resource.</p> <p>I believe the code explains itself, but just in case I am being arrogant I will explain myself. </p> <p>My program lists movies, to a treeview, according to the drop down lists selected genre. Each movie has a few genres, ergo the nested genres.</p> <p>This is the XML:</p> <pre><code> &lt;movie&gt; &lt;title&gt;2012&lt;/title&gt; &lt;director&gt;Roland Emmerich&lt;/director&gt; &lt;writtenBy&gt; &lt;writter&gt;Roland Emmerich,&lt;/writter&gt; &lt;writter&gt;Harald Kloser&lt;/writter&gt; &lt;/writtenBy&gt; &lt;releaseDate&gt;12-Nov-2009&lt;/releaseDate&gt; &lt;actors&gt; &lt;actor&gt;John Cusack,&lt;/actor&gt; &lt;actor&gt;Thandie Newton, &lt;/actor&gt; &lt;actor&gt;Chiwetel Ejiofor&lt;/actor&gt; &lt;/actors&gt; &lt;filePath&gt;H:\2012\2012.avi&lt;/filePath&gt; &lt;picPath&gt;~\image\2012.jpg&lt;/picPath&gt; &lt;runningTime&gt;158 min&lt;/runningTime&gt; &lt;plot&gt;Dr. Adrian Helmsley, part of a worldwide geophysical team investigating the effect on the earth of radiation from unprecedented solar storms, learns that the earth's core is heating up. He warns U.S. President Thomas Wilson that the crust of the earth is becoming unstable and that without proper preparations for saving a fraction of the world's population, the entire race is doomed. Meanwhile, writer Jackson Curtis stumbles on the same information. While the world's leaders race to build "arks" to escape the impending cataclysm, Curtis struggles to find a way to save his family. Meanwhile, volcanic eruptions and earthquakes of unprecedented strength wreak havoc around the world. &lt;/plot&gt; &lt;trailer&gt;http://2012-movie-trailer.blogspot.com/&lt;/trailer&gt; &lt;genres&gt; &lt;genre&gt;Action&lt;/genre&gt; &lt;genre&gt;Adventure&lt;/genre&gt; &lt;genre&gt;Drama&lt;/genre&gt; &lt;/genres&gt; &lt;rated&gt;PG-13&lt;/rated&gt; &lt;/movie&gt; </code></pre> <p>This is the code: </p> <pre><code> string selectedGenre = this.ddlGenre.SelectedItem.ToString(); XDocument xmldoc = XDocument.Load(Server.MapPath("~/App_Data/movie.xml")); List&lt;Movie&gt; movies = (from movie in xmldoc.Descendants("movie") // The treeView doesn't exist where movie.Elements("genres").Elements("genre").ToString() == selectedGenre select new Movie { Title = movie.Element("title").Value }).ToList(); foreach (var movie in movies) { TreeNode myNode = new TreeNode(); myNode.Text = movie.Title; TreeView1.Nodes.Add(myNode); } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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