473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Accessing remote XML files like Netvibes.com does

I would like to create my onw rss feed reader. I've been able to get as far as being able to fetch parse and print news stories form various different sources however I have a big problem.

When I try to run it online I get an "access denied" error. There reason for this error I know is that most browers have a security setting that won't allow you to access files across servers.

In order to get the javascript to work I have to change my security setting to below recommended level. It also means that other people would have to do this which doesn't really fly.

How can I work around this. How do sites like netvibes.com do it for example?

Thanks
Jan 10 '07 #1
6 2424
b1randon
171 Expert 100+
I would like to create my onw rss feed reader. I've been able to get as far as being able to fetch parse and print news stories form various different sources however I have a big problem.

When I try to run it online I get an "access denied" error. There reason for this error I know is that most browers have a security setting that won't allow you to access files across servers.

In order to get the javascript to work I have to change my security setting to below recommended level. It also means that other people would have to do this which doesn't really fly.

How can I work around this. How do sites like netvibes.com do it for example?

Thanks
This is one of the most restrictive boundaries to Web 2.0 projects. Because of the cross-site scripting restriction you'll have to make a call (probably AJAX) to your sever where you can aggregate data from outside resources, pack it up in XML and send it back to the browser. Such a pain, but it is a reality you have to work with.
Jan 10 '07 #2
This is one of the most restrictive boundaries to Web 2.0 projects. Because of the cross-site scripting restriction you'll have to make a call (probably AJAX) to your sever where you can aggregate data from outside resources, pack it up in XML and send it back to the browser. Such a pain, but it is a reality you have to work with.
Thanks, B1randon. What sort of call to my server do I have to make that will allow me to aggregate data from remote sources, and how do I do this? And how do I "pack it up in XML"?

Have you been able to do it this way?
Jan 10 '07 #3
Pull your data down totally independant from any browser. Parse and temp write your data to a directory on your web server with a PUT command and then pull the data into your site. If you look into MSXML3 , 4, 6 (MS really dropped the ball on this one) 6 is an upgrade of 4 not a complete stand alone install and 4 is the same of 3 so you have to install all 3 as I understand it for it to work. Actually you could just run the script from the webserver (eliminating the PUT command portion) and trigger it from a JS in your site. I can post some basic code for pulling the data down to a local level if you need it. I am using the code in Lotus Approach so it is Lotus Script but very similiar to JS and VBS. Should not be a big deal to convert.
Jan 10 '07 #4
Elgemcdlf, I gather from what you're saying that the way to get around this is to use cgi to fetch and parse the data then just display it from my server, right? This might be the way I'll have to do it.

But is still begs the question as to how Netvibes is able to get you to enter in a remote xml file from anywhere and it parses it for you live.

It's generous of you to offer to share your code. It would be very helpful. Thanks.
Jan 10 '07 #5
It has been awhile since I have done any Net type work. Basically what happens at the site you are exampling is they are most likely running a SOAP engine. Probably AXIS on an Apache server. You are sending a SOAP request and it has a return (response). Both of which are XML format. So if you are submitting an XML doc it is taking that doc and parsing it out to display in a web page? The way that works is the elements are put into id'd areas of a page.

Perhaps I am not fully understanding what you are trying to do. I thought you were trying to retrieve data from a server to use as content in your site. If so you just use something like:

Dim xml
Dim http

Set xml = CreateObject("MSXML2.DOMDocument")
xml= "whatever_you_desire_to_send_as_a_string"

Set http = CreateObject("Microsoft.XMLHTTP")
http.open "POST", "whoever_you_are_connecting_to"
http.send xml

While http.readyState <> 4
Wend
Msgbox http.responseText, , "Output SOAP Message"

There are variations of this snippet but this is basically what takes place. This runs from MSXML3. Once you had this coded the way you needed simply write a snippet of JS that would call it from your page and then another that would take the results and place them on your page.

You could do an OnLoad() with JS calling a cgi script that utilized something like this that also had functions that parsed out the XML and then placed it into your page. There may be an easier way but I am working from a app to app mentality. I am pulling info from servers connected to the Net and using that data in my app. The above is VBS style. If you are on a UNIX or Linux server best written in perl but I think you should have an idea now. Either that or I simply made it more confusing :)
Jan 10 '07 #6
Okay, I'm going to look into "SOAP" since I've heard quite a bit about it. Thanks again.
Jan 10 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

36
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
1
by: Z0gS | last post by:
I got this problem for the web application I try to access files on a remote server. string dirs = Directory.GetDirectories(@"E:\vehicles") E drive is a map to a network drive. I get the...
1
by: Max Baki via .NET 247 | last post by:
I all, i've write a sample ftp Windows service which download files and copy them on remote share or remote mapped drive (the service works fine on local drives). This part of code is the...
5
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet...
7
by: David Laub | last post by:
I've also posted this issue to a Sun/java formum, but since it appears to be an integration issue, this may be the better place to posr: I have written a dot net/c# Web Services doesn't fully...
8
by: Ben Fidge | last post by:
Hi I have a small WinForms app that needs to copy files from a shared drive on a network. If I connect to the mapped drive using Explorer, a password dialog pops-up and I have to provide...
1
by: Jerim79 | last post by:
Probably an incredibly simple answer, but I can't seem to phrase it so a search engine can understand it. I have a php script with a simple include: include("/include_this.php") I need to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.