Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eternal XML file

Status
Not open for further replies.

2nddawn

Programmer
May 1, 2003
14
US
ok I am tryign to figure out what I'm doing wrong.

I put <xml src=&quot;filename.xml&quot; id=&quot;someID&quot;></xml> to reference to an xml data file. For some reason it won't get the data from that source. I have tried fully qualified URL and just filename. Niether of them pull the data. I was wondering if I was doing something wrong? If anyone could help I woudl appreciate it.
 
>> I put <xml src=&quot;filename.xml&quot; id=&quot;someID&quot;></xml> to
>> reference to an xml data file.

You put that in an HTML file and opened the file with Internet Explorer? If so, how do you know it did not load the data?

-pete

 
because there was more to the HTML file than just that. Here is the code form the entire page. ((and the data loads into the table when run locally but not when I run it from either my server or from a different server)) but when I copy adn paste what is in the xml document direclty into the file it runs just fine.

<html>
<xml src=&quot; id=&quot;WeatherInfo&quot;></xml>
<table dataSrc=#WeatherInfo border=1>
<tr>
<Td>Country</Td>
<Td><SPAN dataFld=country></SPAN></Td>
<tr>
<td>City</td>
<td><SPAN dataFld=city></SPAN></td>
<tr>
<td> Current Temp</td>
<td><span dataFld=realtemp></span> &deg; F</td>
</tr>
</table>
</html>
 
Works fine from my machine.

>> but not when I run it from either my server or from a
>> different server))

Those servers might not have MSXML installed correctly or perhaps a old version. An update might help.

Are you servers in that same domain (weather.interceptvector.com)?

-pete

 
No they are not in that same domain ((computer I had it working on locally nor the servers I've tried it on)) Even stranger is when I run it as when on the network the is on it works fine, but once I do a full qualified domain in it stops working.

The weather.interceptvector.com server is set for a place where people can get teh XML files for weather informatiuon from all over the world to use on their sites free of charge.

As for the version of XML. How would I go about finding out what version of MSXML I have installed? This XML stuff is new to me and I'm trying to learn it to enhance my knowledge for web design.
 
All that seems to talk about is client side information. Last I checked <xml src=&quot;whatever&quot;></xml> has been around for quite a while. here is the actual file and you will see it isn't pulling data. .. I don't know why it isn't pulling data. And if for some reason that tag doens't work it negates one of the biggest reasons for XML which is accessable data without replication.
 
2nddawn,

Please be patient we are experiencing technical difficulty [lol]

So I saved the file to my disk and dropped it on IE and it works great. I uploaded it to my web site and it does not work.

My first guess is…. it might be a browser sandbox issue. The browser or MSXML ActiveX control is seeing the different domain and not sending the request for the data.

Or, the server is seeing the HTTP_REFERER value and denying the request.

Those are my two guesses.


 
YAY now you see my problem *L*

OK what do you mean by &quot;Browser Sandbox&quot;?

As for HTTP_REFERER I don't think it is htat since the service is made for people to pull XML information from to put weather on it but I could be wrong. I'm going to e-mail them and see if that is the problem anyways. Or maybe they can help wth my problem.
 
>> OK what do you mean by &quot;Browser Sandbox&quot;?

For security purposes the browsers don't allow cross domain access to dynamic resources like from Java Applets etc. I thought they loosened the sandbox somewhat the past couple years but maybe not for the MSXML ActiveX control.

Have you searched MSDN? I would imagine there would be some technical articles about the subject if it is a security issue.

Yep here is an excerpt
In this case, MSXML blocks cross-domain interaction. For example, if example.com was the DNS domain requested in the URL, you would not be able to interact with another domain, such as microsoft.com.

found it using google MSXML &quot;cross domain&quot;

Sorry it took me so long to figure that one out... should have known that. [hammer]

-pete

 
That is perfectly fine I'm not really in a rush.

I had never heard about the cross domain issue. That is a good piece of knowledge to know. This was the first time I had ever tried to do anything accross domains. ((well other than linking images accross my works domains)) I guess I will eitehr have to write a script within the file to pull the information and input it into the file or as a scheduled task to get the file every so often.

Thank you very much. I probably would have never found that out ((especialy since I didn't know about the cross domain issues since I have never run into that problem and didn't even know it ever existed since I didn't start my actual web design learning until probably 3 or 4 years ago))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top