Basically I am trying to parse xml from https://habbo.com/gamedata/furnidata_xml/1 however I recieve {"The remote server returned an error: (463)."} (System.Net.WebException) The error happens in string xml = webClient2.DownloadString(address);
Here is my full code
Task.Run((Action)(() => { XmlDocument xmlDocument = new XmlDocument(); using (WebClient webClient1 = new WebClient()) { WebClient webClient2 = webClient1; Uri address = new Uri("https://habbo.com/gamedata/furnidata_xml/1"); string xml = webClient2.DownloadString(address); xmlDocument.LoadXml(xml); } foreach (XmlNode xmlNode1 in xmlDocument.GetElementsByTagName("furnitype")) { string nr1 = "[" + xmlNode1.Attributes["id"].Value + "]"; string nr2 = " : " + xmlNode1.Attributes["classname"].InnerText; foreach (XmlNode xmlNode2 in xmlNode1) { XmlNode childNode = xmlNode2; if (childNode.Name == "name") { this.FurniCB.Invoke((Action)(() => this.FurniCB.Items.Add((object)(nr1 + nr2 + " : " + childNode.InnerText)))); this.FurniDataList.Add(nr1 + nr2 + " : " + childNode.InnerText); } } } }));
No comments:
Post a Comment