private string GetNextPagingUrl(string responseFeed) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(responseFeed); XmlNamespaceManager nsmgr = NameSpaceHelper.CreateNamespaceManager(xmlDocument.NameTable); XmlElement xmlNode = (XmlElement)xmlDocument.DocumentElement.SelectSingleNode("atom:link[@rel='next']", nsmgr); if (null == xmlNode) { return(null); } if (!xmlNode.HasAttribute("href")) { return(null); } string href = xmlNode.Attributes["href"].Value; if (string.IsNullOrEmpty(href)) { return(null); } return(href); //return xmlDocument.SelectSingleNode("/sdata:tracking/sdata:pollingMillis", nsmgr).InnerText; }
private int GetPollingMillis(string responseFeed) { try { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(responseFeed); XmlNamespaceManager nsmgr = NameSpaceHelper.CreateNamespaceManager(xmlDocument.NameTable); int pollingMillis = int.Parse(xmlDocument.SelectSingleNode("/sdata:tracking/sdata:pollingMillis", nsmgr).InnerText); if (pollingMillis <= 0) { return(1000); } return(pollingMillis); } catch { return(1000); } }