0

How can I get the XML code in this link

https://www.betorder.com/GetLiveScore?qq=62642&sportTypeId=1&fid=0&lang=TR&countryId=all&checkBoxSelected=all

I'm trying to do but it does not

public void sonucAl() 
{
    string adres = "https://www.betorder.com/GetLiveScore?qq=62642&sportTypeId=1&fid=0&lang=TR&countryId=all&checkBoxSelected=all";
    WebRequest gelenIstek = HttpWebRequest.Create(adres);
    WebResponse gelenCevap;
    using (gelenCevap = gelenIstek.GetResponse())
    {
        using (StreamReader donenDeger = new StreamReader(gelenCevap.GetResponseStream()))
        {
            string gelenBilgi = donenDeger.ReadToEnd();
            string gonder = gelenBilgi;
            div.InnerHtml = gonder;
        }
    }
}
Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
bahalyn33
  • 1
  • 2
  • Please [edit] your question to include whatever specific error or problem you're running into. Thanks for improving the question's reference value and making it more answerable! – Nathan Tuggy Feb 23 '15 at 02:07
  • possible duplicate of [How to load XML from URL on XmlDocument()](http://stackoverflow.com/questions/7496913/how-to-load-xml-from-url-on-xmldocument) – Alexei Levenkov Feb 23 '15 at 02:16

1 Answers1

1

I think what you are looking for can be found in the following post:

How to load XML from URL on XmlDocument()

From personal experience and based on the sample from the post above, below is how you would load the xml:

string m_strFilePath = "https://www.betorder.com/GetLiveScore?qq=62642&sportTypeId=1&fid=0&lang=TR&countryId=all&checkBoxSelected=all";
XmlDocument myXmlDocument = new XmlDocument();
myXmlDocument.Load(m_strFilePath); //Load NOT LoadXml
Community
  • 1
  • 1
malkassem
  • 1,937
  • 1
  • 20
  • 39