×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    89

    Can XMLHttpRequest "GET" common website?

    Using XmlHttpRequest, I can access some RSS sites, but when it comes to, for example, www.yahoo.com, it fails.at blue line. Seems that there is nothing fetched.
    Question is, how to get these site with XmlRequestHttp?

    Code:
    var xmlHttp = new XMLHttpRequest();
    
                  if(xmlHttp.readyState == XMLHttpRequest.DONE){
                      console.log("==========state is Done");
                      var a = xmlHttp.responseXML.documentElement;
                  }
                  xmlHttp.open("GET", "http://rss.sina.com.cn/roll/sports/hot_roll.xml");
                  xmlHttp.send();

  2. #2
    Registered User
    Join Date
    Jul 2010
    Posts
    40

    Re: Can XMLHttpRequest "GET" common website?

    XMLHttpRequest.responseText()

  3. #3
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    89

    Re: Can XMLHttpRequest "GET" common website?

    Hi,

    You are right. XMLHttrRequest can get common website, like www.yahoo.com, and output them to a string by using "responseText". (But fail to convert it into DOM by responseXML").

    Then, how to parse this string consist of HTML tags? Can QML(including the supported Javascirpt) do it or I will turn to QT - I think XMLHttpRequest could do it, but not find a valid method so far.

  4. #4
    Registered User
    Join Date
    Jul 2010
    Posts
    40

    Re: Can XMLHttpRequest "GET" common website?

    perhaps, try to feed it on a pure javascript html parser. http://ejohn.org/blog/pure-javascript-html-parser/

  5. #5
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Can XMLHttpRequest "GET" common website?

    Hi,

    I am also trying the same in qml with the help of java script but I am not getting responseText from the website.

    --xmlHttp.readyState--1
    --xmlHttp.responseType--undefined
    --xmlHttp.readyState--4
    --xmlHttp.responseType--undefined

    xmlHttp.responseText is coming blank.

    Can anyone suggest something?

    Thanks.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  6. #6
    Registered User
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    2,571

    Re: Can XMLHttpRequest "GET" common website?

    No idea if there is no responseText. Possibly something to do with proxy.

    I've had some success with ejohn.org post noted by loellanthony in #4. See http://www.developer.nokia.com/Commu...l=1#post884082 for more information

Similar Threads

  1. Replies: 10
    Last Post: 2011-05-17, 18:00
  2. where/how i can get a "flash2ui.dll" or "flash3ui.dll" file?
    By jasonfqw in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2009-10-21, 07:56
  3. How can i use the "CMsvEntry", "TMsvEntry", "CImSmtpSettings"?
    By GFYsweetwood in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2009-03-12, 07:36
  4. Errata on "AVKON Common File Dialogs Usage"
    By kcome in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-11-03, 12:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×