It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

RSS issues

page: 1
0

log in

join
share:

posted on Oct, 20 2005 @ 08:50 AM
link   
Hi, i'm currently in the process of trying to write a _javascript RSS feed reader using the XMLHTTP and XMLDOM objects.

It pretty simple stuff really but i'm having problems with the ATS feeds.

Using the XMLHTTP object you can make a request for the ATS RSS feeds.

Once you’ve made the request the xml file is return in plain text, not very useful when you want to read through it. So you use the XMLHTTP.responseXML method that contains a XML Dom for the file.

Unfortunately when i retrieve any ATS feed the responseXML bit is always empty, it's as if it's not seeing the feed as a real xml document and therefore not creating the DOM. In my experience it’s usually because the mime type of the page is set to text/html and not text/xml.
However all the ATS feeds I’ve tried are set to text/xml so there shouldn’t be any problems there.

I did some testing and it seems to work fine with most other rss feeds just not any at ATS.

I knock up a quick page to show the problem. Unfortunately it'll only work in IE at the moment as both IE and Mozilla implemented the XML Dom differently and it would require a bit of extra coding to get them to play together.

Also you may need to add the site to your trusted sites to get it to work correctly. If you don’t do this you may receive an "Access Denied" error.

Here’s the link

www.fearisthemindkiller.co.uk...

You can see how the page works by just viewing the source.

Basically click on of the urls, then click the "Get RSS feed" button. The page will then refresh and write the rss feed to the screen, you'll then get an alert pop up telling if the responseXML returned a valid DOM or not. If it did it'll tell you the first element name, RSS in this case.

You'll notice that none of the ATS feeds return a valid DOM. I've compared the raw XML and there doesn't seem to be any significant differences, so I’m at a bit of a loss.

I thought I’d see if any one else has had this problem with rss feeds before.

Not holding out much hope but I thought I’d ask just in case



[edit on 20-10-2005 by Burgess]




posted on Oct, 20 2005 @ 09:28 AM
link   
The feeds authenticate just fine.



posted on Oct, 20 2005 @ 09:46 AM
link   
Upon clicking "Get RSS feed" button all I get is "Error on page" in status bar.

Using latest Java and IE w/ all updates.

???


"Line: 43
Char: 1
Error: Permission Denied
Code: 0
URL: www.fearisthemindkiller.co.uk..."

No popup blockers and even turned off firewall and antivirus software

???


[edit on 10/20/2005 by 12m8keall2c]



posted on Oct, 20 2005 @ 09:54 AM
link   
As i mentioned in the first post you'll probably need to add the website to your trusted domains.

If you dont IE will probably block it hence getting the "access denied" error.




The feeds authenticate just fine.


Yeah, that’s the confusing part


I've been reading around on the net and i'm beginning to think it's just a really weird bug with the XMLHTTP object. Quite a few other people have had similar problems.

Back to the drawing board then, cheers for the responses!



posted on Oct, 20 2005 @ 10:02 AM
link   

As i mentioned in the first post you'll probably need to add the website to your trusted domains.

If you dont IE will probably block it hence getting the "access denied" error.


Yep... now I see.

"didn't return a valid XMLDom"

Good luck Burgess



posted on Oct, 20 2005 @ 10:08 AM
link   


Good luck Burgess



Cheers


I think i'll need it, i can see a good few hours of trial and error tonight


If I figure it out i'll post back.

Cheers again guys.



posted on Oct, 20 2005 @ 10:29 AM
link   
You may want to look into using cross-browser AJAX for this. A quick Google pulled this result:

www.freeprogrammingresources.com...

I'd offer you a code snippet myself, but the "straight" AJAX code I have that would be great for what you're doing isn't working right now, and everything else I have is in a .NET component, and probably wouldn't help much in this case.

Good luck



posted on Oct, 20 2005 @ 10:40 AM
link   
Cheers for that link, plenty of stuff to read over


I was trying to stay away from making calls back to my sever, mostly because i've got something written in classic asp that does pretty much exactly what i'm trying to achieve here but using a script on the server to do all the processing and then return the relevant info back.

I just wanted to see if i could do it in pure _javascript with out using a server side script



posted on Oct, 20 2005 @ 11:29 AM
link   
I managed to get round it,



var url = "http://www.abovetopsecret.com/forum/rss/all.xml";

var oRequest = HttpRequest();
oRequest.open ("get", url, false);

oRequest.send(null);

var xmltext = oRequest.responseText;

oRequest = null;

var xmlDOM = createXMLDOM();

xmlDOM.loadXML(xmltext);


If you take the responseText you can load it in to a DOM by using the loadxml method. It's done slightly different in Mozilla but the result is the same.

Problem solved


Thanks for your input guys


And thanks for the link Mcory1



new topics

top topics



 
0

log in

join