<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Trouble with loadXML from string' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Trouble with loadXML from string' posted on the 'AJAX' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Wed, 23 May 2012 07:08:50 -0700</pubDate>
    <lastBuildDate>Wed, 23 May 2012 07:08:50 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Trouble with loadXML from string</title>
      <link>http://www.programmersheaven.com/mb/ajax/365117/365117/trouble-with-loadxml-from-string/</link>
      <description>Hi, I got some trouble parsing an XML response from a string in IExplorer. The javascript code that does the parsing looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
if (typeof DOMParser == "undefined") {
                        DOMParser = function () {}
                        DOMParser.prototype.parseFromString = function (str, contentType) {
                            if (typeof ActiveXObject != "undefined") {
                               var d = new ActiveXObject("Microsoft.XMLDOM");
                               d.async="false";
                               d.loadXML(str);
                               return d;
                            } else if (typeof XMLHttpRequest != "undefined") {
                               var req = new XMLHttpRequest;
                               req.open("GET", "data:" + (contentType || "application/xml") +";charset=utf-8," + encodeURIComponent(str), false);
                                if (req.overrideMimeType) {
                                req.overrideMimeType(contentType);
                                }
                               req.send(null);
                               return req.responseXML;
                            }
                        }
                    }
                    var xml = (new DOMParser()).parseFromString(text, "text/xml");
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
where "text" (in the last line) is a string with the response I recieve from the server. In firefox and opera it works fine, but in Iexplorer "xml"(in the last line) is a empty xml document no matter what I do input as "text". What am I doing wrong?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ajax/365117/365117/trouble-with-loadxml-from-string/</guid>
      <pubDate>Wed, 29 Aug 2007 04:43:31 -0700</pubDate>
      <category>AJAX</category>
    </item>
    <item>
      <title>Re: Got it</title>
      <link>http://www.programmersheaven.com/mb/ajax/365117/365141/re-got-it/#365141</link>
      <description>Hi, I got the bug, it had to do with the XML I used.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ajax/365117/365141/re-got-it/#365141</guid>
      <pubDate>Wed, 29 Aug 2007 23:54:12 -0700</pubDate>
      <category>AJAX</category>
    </item>
    <item>
      <title>This post has been deleted.</title>
      <link>http://www.programmersheaven.com/mb/ajax/365117/394574/this-post-has-been-deleted/#394574</link>
      <description>This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ajax/365117/394574/this-post-has-been-deleted/#394574</guid>
      <pubDate>Mon, 03 Aug 2009 02:42:14 -0700</pubDate>
      <category>AJAX</category>
    </item>
  </channel>
</rss>
