private AdferoVideoOutputList ListVideoOutputsFromXmlString(string xml) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); int totalCount = int.Parse(doc.SelectSingleNode("//videoOutputs").Attributes["totalCount"].Value); AdferoVideoOutputList videoOutputs = new AdferoVideoOutputList(); videoOutputs.TotalCount = totalCount; foreach (XmlNode n in doc.SelectNodes("//videoOutputs/videoOutput")) { foreach (XmlNode na in n.SelectNodes("id")) { AdferoVideoOutputListItem videoOutput = new AdferoVideoOutputListItem(); videoOutput.Id = int.Parse(na.InnerText); videoOutputs.Items.Add(videoOutput); } } return(videoOutputs); }
private AdferoVideoOutputList ListVideoOutputsFromXmlString(string xml) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); int totalCount = int.Parse(doc.SelectSingleNode("//videoOutputs").Attributes["totalCount"].Value); AdferoVideoOutputList videoOutputs = new AdferoVideoOutputList(); videoOutputs.TotalCount = totalCount; foreach (XmlNode n in doc.SelectNodes("//videoOutputs/videoOutput")) { foreach (XmlNode na in n.SelectNodes("id")) { AdferoVideoOutputListItem videoOutput = new AdferoVideoOutputListItem(); videoOutput.Id = int.Parse(na.InnerText); videoOutputs.Items.Add(videoOutput); } } return videoOutputs; }