PDA

View Full Version : New to XML - Accessing external XML data


healeyx76
08-12-2007, 01:50 AM
I'm very very new to xml, but I have read over some quick tutorials. (I know a few other languages, which seems to make learning this easier).
Instead of searching through the hundreds of tutorials to find an answer to this simple question, i thought i'd ask here (it wasn't in the first few tutorials i saw, and I DID LOOK, im not that lazy, just in a hurry to test an idea)

heres what I want to do:

There exists an uneditable read-only XML file, containing quite a large bit of data. This XML is on another server. It is all properly formatted, and the XML is not linked to any XSL or formatting sheet.

I would like to have my own xml+xsl combo access this external XML file.

Everything I read in tutorials is about using xsl to style xmls, but theyre xml's that you can edit and point to the xsl. Is there a way to import/access this read-only data? (I assume there has to be).

And how would I do that?

I don't need code examples though they could help. I just need to know where to look, or what functions to use or declarations/identifiers to use.

I'm starting from scratch here, so I want to get basic functionality out of the way.

Thanks for any of your help! It is greatly appreciated.

For an example of how this would be used? Say you want to make your own webpage that displays the time and temperature of 20 cities, which are saved in an xml file on some weatherfunwhatever.com site. How would I go about accessing it?

rwedge
08-18-2007, 06:24 AM
You can use a server side script to get the remote file to use locally. Perl or PHP for example. If the remote file is updated regularly you can set the server side script to run on a schedule to update a local copy.

mlseim
09-01-2007, 01:45 AM
This is an example of grabbing "weather underground" RSS Feed for
Scottsdale, Arizona. It parses out some basic information and displays
a graphic image based on the current condition.

http://catpin.com/weather/

Here's more detailed information for a foreign city (in Vietnam):
http://catpin.com/vietnam/

Again, using PHP to parse out the needed information.

It takes a bit of coding, but you can pretty much gather anything you wish.

If this is what you're interested in, private message me
with an XML feed URL that you want to parse.

zajo
09-24-2007, 04:57 PM
I`m working on a rss feed for one site. The "feed" is on "somewhere/index.php" that`s what the admin has sent me. If i open the file in a browser it shows me some non/formatted text, but as i open the source code - there is an XML code inside. I ust don`t know how to connect to that file under a name and password, those that admin has already sent me.

It was lil bit hard for me, cos i`m not good enough in english. I hope zou know what i need

just to open a file that is thare as index.php and read it

zajo
09-26-2007, 05:44 PM
Please help.

mlseim
09-26-2007, 09:20 PM
If the "index.php" is on someone else's server (on the internet),
you can't view the source code ... only the HTML source as it
appears on your browser.

It seems like you might be viewing the "index.php" file on your
own server? I don't understand that part of your message.

What is the RSS feed supposed to provide?

zajo
09-26-2007, 10:05 PM
I should use the html source of index on someone else`s server and parse it like an xml file. There is also a litlle problem, that the file(index.php) is accessible(through the browser) only with name and password. Have U ever solved something like this?

all I need is to check the category(xml) and add the news to the site database that I am working on

and thank you for your help