title: Read XML from c#
body: <p>I'm trying to read a xml file from a c# application. so far no luck at all. This is the XML file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ExportJobs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;JobList&gt;
      &lt;Job Id="555555"&gt;
        &lt;Comments&gt;&lt;/Comments&gt;
        &lt;DueDate&gt;2017-11-17&lt;/DueDate&gt;
        &lt;FormattedDueDate&gt;17-Nov-2017 12:00&lt;/FormattedDueDate&gt;
        &lt;TargetDueDate&gt;2017-11-17&lt;/TargetDueDate&gt;
        &lt;ServiceTypeId&gt;3&lt;/ServiceTypeId&gt;
        &lt;ServiceType&gt;Service&lt;/ServiceType&gt;
        &lt;TenantName&gt;Miss Ash&lt;/TenantName&gt;
        &lt;Uprn&gt;testUpr&lt;/Uprn&gt;
        &lt;HouseName&gt;&lt;/HouseName&gt;
      &lt;/Job&gt;
      &lt;Job Id="666666"&gt;
        &lt;Comments&gt;&lt;/Comments&gt;
        &lt;DueDate&gt;2018-03-15&lt;/DueDate&gt;
        &lt;FormattedDueDate&gt;15-Mar-2018 12:00&lt;/FormattedDueDate&gt;
        &lt;TargetDueDate&gt;2018-03-15&lt;/TargetDueDate&gt;
        &lt;ServiceTypeId&gt;3&lt;/ServiceTypeId&gt;
        &lt;ServiceType&gt;Service&lt;/ServiceType&gt;
        &lt;TenantName&gt;Mr Howard&lt;/TenantName&gt;
        &lt;Uprn&gt;testUpr2&lt;/Uprn&gt;
      &lt;/Job&gt;
    &lt;/JobList&gt;
  &lt;/ExportJobs&gt;
  </code></pre>
  
  <p>I'm trying to get the <strong>job Id</strong> and the  <strong>Uprn</strong> from the joblist node and pass the values in to Sql Server DB. I tried this, but I can't get the values,</p>
  
  <pre><code>            string costCode;
              string uprn;
  
              //File path where the xml is located
              string filepath = "C:\\ExportJobs.xml";
  
              XmlDocument xmlDoc = new XmlDocument();
              xmlDoc.Load(filepath);
  
              foreach (XmlNode node in xmlDoc.DocumentElement.ChildNodes)
              {
  
                  costCode = node.Attributes["Id"].InnerText;
                  uprn = node.Attributes["Uprn"].InnerText;
              }
  </code></pre>
  
  <p>I really appreciate any help. Thanks</p>