<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Any alternative to load function of XML DOM.</title>
        <description>Hi all, 
I am stuck with a problem related to XML DOM . I was trying to parse the RSS feed given by BBC and display the feeds in my webpage thats running on localhost .
This is the code snippet

    var xmlDoc=null;
    if (window.ActiveXObject)
    {// code for IE
    xmlDoc=new ActiveXObject(&amp;quot;Microsoft.XMLDOM&amp;quot;);
    }
    else if (document.implementation.createDocument)
    {// code for Mozilla, Firefox, Opera, etc.
    xmlDoc=document.implementation.createDocument(&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,null);
    }
    else
    {
    alert('Your browser cannot handle this script');
    }

    if (xmlDoc!=null)
    {
      xmlDoc.async=false;
      xmlDoc.load(&amp;quot;http://en-US.fxfeeds.mozilla.com/en-US/firefox/headlines.xml&amp;quot;);
     
     }

On doing so I get an error in firebug as &amp;quot;uncaught exception: Permission denied to call method XMLDocument.load&amp;quot; .
I also understand that  load() has restrictions  that the file that you want to load and the program thats loading it must be on the same server . I want to know  is there any alternative to load() that I can use to get things running .

Shivkumar Lal</description>
        <link>http://sla.ckers.org/forum/read.php?10,23907,23907#msg-23907</link>
        <lastBuildDate>Thu, 23 May 2013 15:15:19 -0500</lastBuildDate>
        <generator>Phorum 5.2.15a</generator>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?10,23907,26443#msg-26443</guid>
            <title>Re: Any alternative to load function of XML DOM.</title>
            <link>http://sla.ckers.org/forum/read.php?10,23907,26443#msg-26443</link>
            <description><![CDATA[this is why hackers cant just instantiate an IFrame in their pages pointing to yahoo or gmail and steel ur login with javascript.<br />
<br />
javascript can't read cross domain pages, just if u use windows mobile 4 or 5 i dont remember lol]]></description>
            <dc:creator>dotnet_1</dc:creator>
            <category>Bugs</category>
            <pubDate>Tue, 03 Feb 2009 11:22:35 -0600</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?10,23907,23945#msg-23945</guid>
            <title>Re: Any alternative to load function of XML DOM.</title>
            <link>http://sla.ckers.org/forum/read.php?10,23907,23945#msg-23945</link>
            <description><![CDATA[Exactly what I was saying. I was just using Java terminology since I develop quite a bit in Java, although I have been known to do PHP too.]]></description>
            <dc:creator>Matt Presson</dc:creator>
            <category>Bugs</category>
            <pubDate>Thu, 07 Aug 2008 16:34:25 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?10,23907,23932#msg-23932</guid>
            <title>Re: Any alternative to load function of XML DOM.</title>
            <link>http://sla.ckers.org/forum/read.php?10,23907,23932#msg-23932</link>
            <description><![CDATA[what i think he is trying to say<br />
firefox doesnt allow you to do a connection to outside your site<br />
but say you create a php page called fetch.php<br />
and did something like this<br />
&lt;?php<br />
$fetch = file_get_contents(&quot;http://en-US.fxfeeds.mozilla.com/en-US/firefox/headlines.xml&quot;);<br />
//(you should do some cleaning of it, so if a hacker comprimsed that page they could inject what ever on to your site, thats why this is just an example<br />
<br />
echo $fetch;<br />
?&gt;<br />
<br />
then in your javascript instead of <br />
xmlDoc.load(&quot;http://en-US.fxfeeds.mozilla.com/en-US/firefox/headlines.xml&quot;); <br />
it would be<br />
xmlDoc.load(&quot;fetch.php&quot;);<br />
<br />
i hope that helps explain a little better. if im wrong sorry, im not a pro at this stuff yet]]></description>
            <dc:creator>PaPPy</dc:creator>
            <category>Bugs</category>
            <pubDate>Thu, 07 Aug 2008 14:42:58 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?10,23907,23915#msg-23915</guid>
            <title>Re: Any alternative to load function of XML DOM.</title>
            <link>http://sla.ckers.org/forum/read.php?10,23907,23915#msg-23915</link>
            <description><![CDATA[What you need is another script, servlet, or page (PHP, Java, .Net) that opens an HttpConnection to the URL you are passing to the load function and have it return the XML. These things are simple enough to write. Then, you would point the load function to the url of that page and you would be set.]]></description>
            <dc:creator>Matt Presson</dc:creator>
            <category>Bugs</category>
            <pubDate>Thu, 07 Aug 2008 09:05:19 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?10,23907,23907#msg-23907</guid>
            <title>Any alternative to load function of XML DOM.</title>
            <link>http://sla.ckers.org/forum/read.php?10,23907,23907#msg-23907</link>
            <description><![CDATA[Hi all, <br />
I am stuck with a problem related to XML DOM . I was trying to parse the RSS feed given by BBC and display the feeds in my webpage thats running on localhost .<br />
This is the code snippet<br />
<br />
    var xmlDoc=null;<br />
    if (window.ActiveXObject)<br />
    {// code for IE<br />
    xmlDoc=new ActiveXObject(&quot;Microsoft.XMLDOM&quot;);<br />
    }<br />
    else if (document.implementation.createDocument)<br />
    {// code for Mozilla, Firefox, Opera, etc.<br />
    xmlDoc=document.implementation.createDocument(&quot;&quot;,&quot;&quot;,null);<br />
    }<br />
    else<br />
    {<br />
    alert('Your browser cannot handle this script');<br />
    }<br />
<br />
    if (xmlDoc!=null)<br />
    {<br />
      xmlDoc.async=false;<br />
      xmlDoc.load(&quot;http://en-US.fxfeeds.mozilla.com/en-US/firefox/headlines.xml&quot;);<br />
     <br />
     }<br />
<br />
On doing so I get an error in firebug as &quot;uncaught exception: Permission denied to call method XMLDocument.load&quot; .<br />
I also understand that  load() has restrictions  that the file that you want to load and the program thats loading it must be on the same server . I want to know  is there any alternative to load() that I can use to get things running .<br />
<br />
Shivkumar Lal]]></description>
            <dc:creator>shivkumarlal</dc:creator>
            <category>Bugs</category>
            <pubDate>Wed, 06 Aug 2008 23:07:01 -0500</pubDate>
        </item>
    </channel>
</rss>
