title: How do I read values from an XML document to build a ComboBox?
body: <p>I'm trying to read an <a href="/questions/tagged/xml" class="post-tag" title="show questions tagged &#39;xml&#39;" rel="tag">xml</a> file which I want to make for my mom. So basically this is what I want to do:</p>
  
  <ol>
  <li>A <code>ComboBox</code> which will show all the vegetable names in the XML.</li>
  <li>After selecting a vegetable, the second <code>ComboBox</code> will show the recipe names in the XML that could use the vegetable selected in the first <code>ComboBox</code> for cooking.</li>
  <li>Last, with a OK <code>Button</code>, the selected recipe will read the file path which leads to the recipe.</li>
  </ol>
  
  <h1>XML I wrote</h1>
  
  <pre><code>&lt;Vegetables&gt;
      &lt;vegetable name="Carrot"&gt;
          &lt;recipe name="ABCrecipe"&gt;
              &lt;FilePath&gt;C:\\&lt;/FilePath&gt;
          &lt;/recipe&gt;
          &lt;recipe name="DEFrecipe"&gt;
              &lt;FilePath&gt;D:\\&lt;/FilePath&gt;
          &lt;/recipe&gt;   
      &lt;/vegetable&gt;
      &lt;vegetable name="Potato"&gt;
          &lt;recipe name="CBArecipe"&gt;
              &lt;FilePath&gt;E:\\&lt;/FilePath&gt;
          &lt;/recipe&gt;
              &lt;recipe name"FEDrecipe"&gt;
              &lt;FilePath&gt;F:\\&lt;/FilePath&gt;
          &lt;/recipe&gt;
      &lt;/vegetable&gt;
  &lt;/Vegetables&gt;
  </code></pre>
  
  <h1>C# code</h1>
  
  <pre><code>private void Form1_Load(object sender, EventArgs e)
  {
      XmlDocument xDoc = new XmlDocument();
      xDoc.Load("Recipe_List.xml");
      XmlNodeList vegetables = xDoc.GetElementsByTagName("Vegetable");
      for (int i = 0; i &lt; vegetables.Count; i++)
      {
          comboBox1.Items.Add(vegetables[i].Attributes["name"].InnerText);
      }
  }
  private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
  {
      //I'm lost at this place.
  }
  </code></pre>
  
  <p>The first <code>ComboBox</code> is now able to display the vegetable names, but how do I make the 2nd <code>ComboBox</code> to read the recipes?</p>