Forum Moderators: open

Message Too Old, No Replies

XML remote call

Pulling data

         

StanTheMan

12:59 am on Oct 12, 2004 (gmt 0)

10+ Year Member



I am trying to extract XML data from a remote website.

It works fine if I save the file to my machine or my directory. Its the bog standard data island script

<html>
<body>

<xml id="cdcat" src="http://www.w3schools.com/xml/cd_catalog.xml"></xml>

<table border="1" datasrc="#cdcat">
<tr>
<td><span datafld="ARTIST"></span></td>
<td><span datafld="TITLE"></span></td>
</tr>
</table>

</body>
</html>

Can anyone point me in the right direction?

Thanks

macrost

2:25 pm on Oct 12, 2004 (gmt 0)

10+ Year Member



StanTheMan,
Hmm, I just tried it and was able to have formatted results.
Now if you are trying a different xml solution provided by an affiliate for example, you might have to use a server side tech to pull the xml and format the result set.

By chance, are you behind a firewall or something?

Xmlx

3:07 pm on Oct 23, 2004 (gmt 0)

10+ Year Member



To use XML Databinding, as in your example, you must be using MS Internet Explorer.

Internet Explorer has a Security feature called "Access data sources across domains". This feature is "disabled" by default.

If you're planning this bit of code for a public webite (not an Intranet), then calling the XML source from another domain will continuely fail.

For XML Databinding, your XML source needs to come for the same website as the page.

Hope this helps. Cheers...

netsurf

6:46 am on Nov 11, 2004 (gmt 0)

10+ Year Member



TRY USING THIS CODE

<html>
<head>
<xml src="http://www.w3schools.com/xml/cd_catalog.xml" id=msg></xml>
</head>
<body>
<table border=1 datasrc=#msg><thead>
<tr>
<td>Title</td>
<td>Arist</td>
<td>Country</td>
<td>Company</td>
<td>Price</td>
<td>Year</td>
</tr>
</thead>
<tr>
<td><span DATAFLD="TITLE"></td>
<td><span DATAFLD="ARTIST"></td>
<td><span DATAFLD="COUNTRY"></td>
<td><span DATAFLD="COMPANY"></td>
<td><span DATAFLD="PRICE"></td>
<td><span DATAFLD="YEAR"></td>

</tr>
</table>
</body>
</html>
//*****end here