title: Reading oddly-formatted XML file C#
body: <p>I need some help with reading an oddly-formatted XML file. Because of the way the nodes and attributes are structured, I keep running into XMLException errors (at least, that's what the output window is telling me; my breakpoints refuse to fire so that I can check it). Anyway, here's the XML. Anyone experienced anything like this before?</p>
  
  <pre><code>&lt;ApplicationMonitoring&gt;
  &lt;MonitoredApps&gt;
          &lt;Application&gt;
              &lt;function1 listenPort="5000"/&gt;
          &lt;/Application&gt;
          &lt;Application&gt;
              &lt;function2 listenPort="6000"/&gt;
          &lt;/Application&gt;
  &lt;/MonitoredApps&gt;
  &lt;MIBs&gt;
      &lt;site1 location="test.mib"/&gt;
  &lt;/MIBs&gt; 
  &lt;Community value="public"/&gt;
  &lt;proxyAgent listenPort="161" timeOut="2"/&gt;
  &lt;/ApplicationMonitoring&gt;
  </code></pre>
  
  <p>Cheers</p>
  
  <p>EDIT: Current version of the parsing code (file path shortened - Im not actually using this one):</p>
  
  <pre><code>XmlDocument xml = new XmlDocument();
  xml.LoadXml(@"..\..\..\ApplicationMonitoring.xml");
  
  string port = xml.DocumentElement["proxyAgent"].InnerText;
  </code></pre>