Reading oddly-formatted XML file C#
===

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?


    <ApplicationMonitoring>
	<MonitoredApps>
			<Application>
				<function1 listenPort="5000"/>
			</Application>
			<Application>
				<function2 listenPort="6000"/>
			</Application>
	</MonitoredApps>
	<MIBs>
		<site1 location="test.mib"/>
	</MIBs>	
	<Community value="public"/>
	<proxyAgent listenPort="161" timeOut="2"/>
    </ApplicationMonitoring>

Cheers

EDIT: Current version of the parsing code (file path shortened - Im not actually using this one):

    XmlDocument xml = new XmlDocument();
    xml.LoadXml(@"..\..\..\ApplicationMonitoring.xml");

    string port = xml.DocumentElement["proxyAgent"].InnerText;