title: how to get the node's Attribute in ASP.NET?
body: <p>I have a XML file and i want to read it and save the result into datatable, here is my XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" standalone="yes"?&gt;
  &lt;NewDataSet&gt;
    &lt;Table name="tblAdminUser"&gt;
  &lt;Column&gt;
    &lt;displayname&gt;
      Created Date
    &lt;/displayname&gt;
    &lt;orignalvalue&gt;
      Created_Date
    &lt;/orignalvalue&gt;
  &lt;/Column&gt;
  &lt;Column&gt;
    &lt;displayname&gt;
      First Name
    &lt;/displayname&gt;
    &lt;orignalvalue&gt;
      F_Name
    &lt;/orignalvalue&gt;
  &lt;/Column&gt;
    &lt;/Table&gt;
  &lt;Table name="test1"&gt;
     &lt;Column&gt; 
       &lt;displayname&gt;
      Last Name
    &lt;/displayname&gt;
    &lt;orignalvalue&gt;
      L_Name
    &lt;/orignalvalue&gt;
  &lt;/Column&gt;
  &lt;Column&gt;
    &lt;displayname&gt;
      Created By
    &lt;/displayname&gt;
    &lt;orignalvalue&gt;
      Created_By
    &lt;/orignalvalue&gt;
  &lt;/Column&gt;
    &lt;/Table&gt;
  &lt;/NewDataSet&gt;
  </code></pre>
  
  <p>Now what i want to do is:</p>
  
  <p>If the "<strong>Name</strong>" of "table" node is "tblAdminuser" then i want to get the "<strong>display column</strong>" node's inner values and corresponding "original value" in a Datatable in two columns.</p>
  
  <p>What i have done up to now is:</p>
  
  <pre><code>XmlDataDocument xmldoc = new XmlDataDocument();
      xmldoc.Load(Server.MapPath("~/XMLFile.xml"));
      XmlElement root = xmldoc.DocumentElement;
      XmlNodeList tablenodes = root.SelectNodes("Table");
      foreach (XmlNode nodes in tablenodes)
      {
  
          if (nodes.LocalName == "tblAdminUser")
          {
              XmlNodeList Columnnodes = root.SelectNodes("Column"); // You can also use XPath here
              XmlNodeList displayColumnnodes = root.SelectNodes("Column");
              foreach (XmlNode node in displayColumnnodes)
              {
                  Response.Write(node.InnerText);
                  // use node variable here for your beeds
              }
          }
      }
  </code></pre>
  
  <p>Please help me. </p>