title: How to get data with Column name in XML?
body: <p>I have XML file like below </p>
  
  <pre><code>&lt;?xml version="1.0" standalone="yes"?&gt;
  &lt;ShippersDataSet xmlns="http://www.tempuri.org/ShippersDataSet.xsd"&gt;
     &lt;Shippers&gt;
        &lt;ShipperID&gt;1&lt;/ShipperID&gt;
        &lt;CompanyName&gt;Speedy Express&lt;/CompanyName&gt;
        &lt;Phone&gt;(503) 555-9831&lt;/Phone&gt;
     &lt;/Shippers&gt;
     &lt;Shippers&gt;
        &lt;ShipperID&gt;2&lt;/ShipperID&gt;
        &lt;CompanyName&gt;United Package&lt;/CompanyName&gt;
        &lt;Phone&gt;(503) 555-3199&lt;/Phone&gt;
     &lt;/Shippers&gt;
     &lt;Shippers&gt;
        &lt;ShipperID&gt;3&lt;/ShipperID&gt;
        &lt;CompanyName&gt;Federal Shipping&lt;/CompanyName&gt;
        &lt;Phone&gt;(503) 555-9931&lt;/Phone&gt;
     &lt;/Shippers&gt;
  &lt;/ShippersDataSet&gt;
  </code></pre>
  
  <p>I have following input for XML data :</p>
  
  <pre><code>string XMLpath, string query 
  </code></pre>
  
  <p>Query : </p>
  
  <pre><code>&lt;Query&gt;
     &lt;ElementPath&gt; Shippers&lt;/ElementPath&gt;
  &lt;/Query&gt;
  </code></pre>
  
  <p>I need to add </p>
  
  <p>Like following , ( I have achieved in SQL) same way I need to add for XML data </p>
  
  <pre><code>var list = new List&lt;Myclassdef&gt;();
  using (var con = new SqlConnection(Settings.Default.ConnectionString))
  {
      using (var cmd = new SqlCommand("SELECT ... WHERE Col1=@param1", con))
      {
          cmd.Parameters.AddWithValue("@param1", "value1");
          // ...
          con.Open();
          using (var reader = cmd.ExecuteReader())
          {
              while (reader.Read())
              {
                  Myclassdef data = new Myclassdef();
                  data.Data = new Dictionary&lt;string, object&gt;();
                  for (int i = 0; i &lt; reader.FieldCount; i++)
                  {
                      data.Data.Add(reader.GetName(i), reader[i]);
                  }
                  list.Add(data);
              }
          }
      }
  }
  </code></pre>
  
  <p>I have following input for XML data :</p>
  
  <pre><code>string XMLpath, string query 
  </code></pre>
  
  <p>Query : </p>
  
  <pre><code>&lt;Query&gt;&lt;ElementPath&gt; Shippers&lt;/ElementPath&gt;&lt;/Query&gt;
  </code></pre>