オランダの現在の天気を取得するWebServiceを使用しようとしています。 XML - ヘッダーに不正な文字が含まれています
public void GetWeather()
{
net.webservice.GlobalWeather.GlobalWeather GlobalWeatherService = new net.webservice.GlobalWeather.GlobalWeather();
string SoapResult = GlobalWeatherService.GetWeather(Location, "Netherlands");
XmlDocument XmlDoc = new XmlDocument();
XmlDoc.Load(SoapResult);
XmlNodeList XmlForecast = XmlDoc.GetElementsByTagName("CurrentWeather");
}
バックWebサービスポスト文字列としてXMLファイル
<?xml version="1.0" encoding="utf-16"?>
<CurrentWeather>
<Location>Amsterdam Airport Schiphol, Netherlands (EHAM) 52-18N 004-46E -2M</Location>
<Time>Jun 20, 2011 - 06:25 AM EDT/2011.06.20 1025 UTC</Time>
<Wind> from the SW (220 degrees) at 9 MPH (8 KT):0</Wind>
<Visibility> greater than 7 mile(s):0</Visibility>
<SkyConditions> partly cloudy</SkyConditions>
<Temperature> 62 F (17 C)</Temperature>
<DewPoint> 51 F (11 C)</DewPoint>
<RelativeHumidity> 67%</RelativeHumidity>
<Pressure> 29.88 in. Hg (1012 hPa)</Pressure>
<Status>Success</Status>
</CurrentWeather>
しかし、私は、私はXmlDoc.Load上ArguementException(パスに無効な文字)を取得XmlDocumentオブジェクトに結果をロードしようとすると、(SoapResult );
私は間違っていますか?
[XmlDocument.LoadXml(SoapResult)](http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.loadxml.aspx) – Filburt
@Filburtはそれを指摘してくれてありがとう! – V4Vendetta
ああ、ありがとうFilburt! –