×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    4

    XMLHttpRequest status OK but XML doc empty

    i am using the Nokia feed reader template

    all feeds are ok except this one:
    http://www.teleboy.ch/xml/tvtipps_movie.xml

    in aptana it works but on device 5800 there is a problem. The responseXML is null

    i'm waiting for httpReq.readyState == 4
    then
    response Status "httpReq.status" = 200
    but "httpReq.responseXML" is null

    all other feeds (like http://www.texxas.de/tv/schweiz.xml) are loading on the device
    What's the problem with this feed?

    thx

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: XMLHttpRequest status OK but XML doc empty

    Hi nbanke,

    welcome to Forum Nokia Discussion Boards!

    Sounds like some characters in the first XML is causing the XML document to be not correctly parsed. If you can edit the XML, you could try to add CDATA sections around the text sections (e.g.: title and description).

    Hope it helps,
    Pit

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    4

    Re: XMLHttpRequest status OK but XML doc empty

    the feeds are not mine. so i can't edit them. I just want to view them in my Feed reader.
    The only difference i've found is at line 3. The <rss> tag looks "short"

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- Hinweis: Diese Seite ist dazu gedacht, in einem RSS-Feed Newsreader gelesen zu werden. Mehr Infos auf www.teleboy.ch/misc/rss -->
    <rss version="2.0">
    <channel>
    <title>Teleboy Film-Tipps heute</title>
    <link>http://www.teleboy.ch/tipps/movie/</link>
    <description>TV-Tipps: Alle Film-Tipps des Tages, die besten Spielfilme im TV heute.</description>
    <language>de-ch</language>
    <copyright>Copyright Cinergy AG, Zürich</copyright>
    <pubDate>Thu, 15 Jul 2010 17:11:00 +0200</pubDate>
    <category>TV-Tipps</category>
    <category>Film-Tipps</category>
    <category>Fernsehen</category>
    <category>TV-Programm</category>
    <image>
    <url>http://www.teleboy.ch/img/teleboy_logo.jpg</url>
    <title>Teleboy Film-Tipps heute</title>
    <link>http://www.teleboy.ch/tipps/movie/</link>
    <description>Teleboy Logo</description>
    </image>
    <item>
    <title>15.07. - Jersey Girl - 20:00 SF2 </title>
    <link>http://www.teleboy.ch/tipps/movie/6289.html</link>
    <description>Independent-Regisseur Kevin Smith inszeniert seinen Kumpel Ben Affleck als fürsorgenden Daddy.</description>
    <author>Teleboy</author>
    <pubDate>Thu, 15 Jul 2010 20:00:00 +0200</pubDate>
    </item>
    ....


    the other feeds look like this

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>


    Edit:
    When i copy the XML file on my private server and load it from there, the feed reader displays the feed correct
    Last edited by nbanke; 2010-07-15 at 16:43. Reason: Edit

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: XMLHttpRequest status OK but XML doc empty

    So, on your server it works without any modifications?

    Just guessing: have you checked if, loading it from the original server, httpReq.responseText value is set?

    Pit

  5. #5
    Registered User
    Join Date
    Jul 2009
    Posts
    4

    Re: XMLHttpRequest status OK but XML doc empty

    thx, that's it!

    i've found code to put this text into standard DOM

    function getResponse(e) {
    div=document.createElement('div');
    div.innerHTML=e.responseText;
    alert(div.firstChild);
    // use this to list all first-level elements.
    //for (var i=0,c;c=div.childNodes[i];i++) alert(c.tagName)
    alert(div.innerHTML)
    }


    i will try this now, so that i can proceed with this feed as usual

Similar Threads

  1. Replies: 3
    Last Post: 2010-05-31, 11:43
  2. Replies: 1
    Last Post: 2010-01-20, 15:00
  3. XMLHttpRequest status always returns NULL
    By vinothg in forum Symbian
    Replies: 6
    Last Post: 2009-09-22, 09:22
  4. Replies: 7
    Last Post: 2006-03-02, 07:50

Posting Permissions

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