public void StringConvertTest() { var xmlStr = "<NewDataSet><Table><Country>Australia</Country><City>Archerfield Aerodrome</City></Table><Table><Country>Australia</Country><City>Amberley Aerodrome</City></Table></NewDataSet>"; var result = StringConvert.ConvertXmlStringIntoObject(xmlStr); Assert.AreEqual(result.Count, 2); }
public async Task <List <Table> > GetWeatherByCountryName(string country) { string cities = string.Empty; var soapClient = new GlobalWeatherSoapClient(globalWeatherSoap); cities = await soapClient.GetCitiesByCountryAsync(country); //string is returned in xml format return(StringConvert.ConvertXmlStringIntoObject(cities)); }