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;
        }
    }
}
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! Commented Feb 23, 2015 at 2:07
  • possible duplicate of How to load XML from URL on XmlDocument() Commented Feb 23, 2015 at 2:16

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.