add namespace using xmlnamespacemanager in C#
<p>I am trying to read the data from <a href="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLclient.php?whichClient=GmlLatLonList&amp;lat=&amp;lon=&amp;listLatLon=&amp;lat1=&amp;lon1=&amp;lat2=&amp;lon2=&amp;resolutionSub=&amp;listLat1=&amp;listLon1=&amp;listLat2=&amp;listLon2=&amp;resolutionList=&amp;endPoint1Lat=&amp;endPoint1Lon=&amp;endPoint2Lat=&amp;endPoint2Lon=&amp;listEndPoint1Lat=&amp;listEndPoint1Lon=&amp;listEndPoint2Lat=&amp;listEndPoint2Lon=&amp;zipCodeList=&amp;listZipCodeList=&amp;centerPointLat=&amp;centerPointLon=&amp;distanceLat=&amp;distanceLon=&amp;resolutionSquare=&amp;listCenterPointLat=&amp;listCenterPointLon=&amp;listDistanceLat=&amp;listDistanceLon=&amp;listResolutionSquare=&amp;citiesLevel=&amp;listCitiesLevel=&amp;sector=&amp;gmlListLatLon=38.99,-77.02%2039.70,-104.80%2047.6,-122.30&amp;featureType=Forecast_Gml2Point&amp;requestedTime=&amp;startTime=2000-01-01T00:00:00&amp;endTime=2012-01-01T00:00:00&amp;compType=Between&amp;propertyName=wx,temp,icons&amp;product=time-series&amp;begin=2004-01-01T00:00:00&amp;end=2015-06-07T00:00:00&amp;maxt=maxt&amp;Submit=Submit" rel="nofollow">XML File</a>. In this elements are prefixed with 'app' and 'gml' text. because of these prefixes I am unable to read the data. For this I am trying to add namespace by using XMLNamespaceManager but not getting. </p>

<p>Edit: </p>

<pre><code>        XmlDocument xmlDoc = new XmlDocument();
        xmlDoc.Load(new StringReader(strResult));
        NameTable nt = new NameTable();
        XmlNamespaceManager prefix = new XmlNamespaceManager(nt);
        string nmspc = xmlDoc.DocumentElement.NamespaceURI;
        prefix.AddNamespace("app:",xmlDoc.DocumentElement.NamespaceURI);

        prefix.PushScope();
</code></pre>

<p>Here the strResult contains <a href="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLclient.php?whichClient=GmlLatLonList&amp;lat=&amp;lon=&amp;listLatLon=&amp;lat1=&amp;lon1=&amp;lat2=&amp;lon2=&amp;resolutionSub=&amp;listLat1=&amp;listLon1=&amp;listLat2=&amp;listLon2=&amp;resolutionList=&amp;endPoint1Lat=&amp;endPoint1Lon=&amp;endPoint2Lat=&amp;endPoint2Lon=&amp;listEndPoint1Lat=&amp;listEndPoint1Lon=&amp;listEndPoint2Lat=&amp;listEndPoint2Lon=&amp;zipCodeList=&amp;listZipCodeList=&amp;centerPointLat=&amp;centerPointLon=&amp;distanceLat=&amp;distanceLon=&amp;resolutionSquare=&amp;listCenterPointLat=&amp;listCenterPointLon=&amp;listDistanceLat=&amp;listDistanceLon=&amp;listResolutionSquare=&amp;citiesLevel=&amp;listCitiesLevel=&amp;sector=&amp;gmlListLatLon=38.99,-77.02%2039.70,-104.80%2047.6,-122.30&amp;featureType=Forecast_Gml2Point&amp;requestedTime=&amp;startTime=2000-01-01T00:00:00&amp;endTime=2012-01-01T00:00:00&amp;compType=Between&amp;propertyName=wx,temp,icons&amp;product=time-series&amp;begin=2004-01-01T00:00:00&amp;end=2015-06-07T00:00:00&amp;maxt=maxt&amp;Submit=Submit" rel="nofollow">XML Data</a></p>
