/// <summary> /// Constructor /// </summary> /// <param name="FileContent">Content of the RSD file</param> public RSD(string FileContent) { if (string.IsNullOrEmpty(FileContent)) throw new ArgumentNullException("FileContent"); XmlDocument Document = new XmlDocument(); Document.LoadXml(FileContent); foreach (XmlNode Children in Document.ChildNodes) { if (Children.Name.Equals("RSD", StringComparison.CurrentCultureIgnoreCase)) { foreach (XmlNode Child in Children.ChildNodes) { if (Child.Name.Equals("service", StringComparison.CurrentCultureIgnoreCase)) { foreach (XmlNode ServiceChild in Child.ChildNodes) { if (ServiceChild.Name.Equals("engineName", StringComparison.CurrentCultureIgnoreCase)) { EngineName = ServiceChild.InnerText; } else if (ServiceChild.Name.Equals("engineLink", StringComparison.CurrentCultureIgnoreCase)) { EngineLink = ServiceChild.InnerText; } else if (ServiceChild.Name.Equals("homePageLink", StringComparison.CurrentCultureIgnoreCase)) { HomePageLink = ServiceChild.InnerText; } else if (ServiceChild.Name.Equals("apis", StringComparison.CurrentCultureIgnoreCase)) { APIs = new APIs((XmlElement)ServiceChild); } } } } } } }
/// <summary> /// Constructor /// </summary> public RSD() { APIs = new APIs(); }