title: How to read XML file to a Dictionary<String,List<String>> with empty strings for null elements
body: <p>I'm having an xml file like:</p>
  
  <pre><code>&lt;root&gt;
    &lt;RowDetails RowName="A" ColumnSize="1"&gt;
      &lt;ColumnDetails ColumnName="A1" /&gt;
    &lt;/RowDetails&gt;
    &lt;RowDetails RowName="B" ColumnSize="2"&gt;
      &lt;ColumnDetails ColumnName="B1" /&gt;
      &lt;ColumnDetails ColumnName="B2" /&gt;
    &lt;/RowDetails&gt;
    &lt;RowDetails RowName="C" ColumnSize="3"&gt;
      &lt;ColumnDetails ColumnName="C1" /&gt;
      &lt;ColumnDetails ColumnName="C2" /&gt;
      &lt;ColumnDetails ColumnName="C3" /&gt;
    &lt;/RowDetails&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>and a Dictionary like :</p>
  
  <pre><code>Dictionary&lt;String, List&lt;String&gt;&gt;MyDict = new Dictioanary&lt;String, List&lt;String&gt;&gt;();
  </code></pre>
  
  <p>and i'm reading the XML file to <code>MyDict</code> is like:</p>
  
  <pre><code>XDocument XDoc = XDocument.Load(Application.StartupPath + @"\foo.xml");
  MyDict = XDoc.Descendants("RowDetails").ToDictionary(X =&gt; X.Attribute("RowName").Value, 
                                                       X =&gt; X.Descendants("ColumnDetails")
                                                             .Select(Y =&gt; Y.Attribute("ColumnName").Value).ToList());
  </code></pre>
  
  <p>Now the Dictionary will contain:</p>
  
  <pre><code>"A"           { "A1" }
  "B"           { "B1", "B2" }
  "C"           { "C1", "C2", "C3" }
  </code></pre>
  
  <p>but my problem is that I need all the list with same count. Empty string should be added for null entry, so the expected result is:</p>
  
  <pre><code>"A"           { "A1", "", "" }
  "B"           { "B1", "B2", "" }
  "C"           { "C1", "C2", "C3" }
  </code></pre>
  
  <p>How can I modify my LINQ query?</p>
  
  <p>Please help me to do this using LINQ.</p>
  
  <p>Thanks in advance.</p>