Jump to content

html/xml/json???


TravAtch

Recommended Posts

I don't know where to post this question but I can't seem to find an exact answer on what I'm looking for anywhere but I know it has to exist. A weather site releases an hourly updated XML document for weather. I want to make a weather map that takes this info and populates it onto a map based on coordinates in a JSON and I feel like I'm struggling big time on this. 

To start, can I put the HTTP link for the XML into to the code or do I have to have it in my local files? If I have to have it in my files, is there a way to automate this so I don't have to do this every hour, 24 hrs a day?

Second, can I have it search for a common item? Like my JSON says Houston's coordinates is 29.7604, -95.3698 where the XML rounds to 29.8, -95.4. For my map, I want the marker to pop up at the former coordinate so some sort of search for if houston=houston, then reference JSON coordinates for Houston? (probably more of JSON."Name" compared to XML."City" for marker to be at JSON."Coordinate")

I have a lot more excel formula experience that I do html coding so this has been quite a learning curve. I've looked at the XML lesson a lot and feel like I'm going in circles trying to get it to pull from an http address. I haven't started on the JSON file comparison yet since I can't get it to recognize the XML file to begin with.

I appreciate any and all assistance!!!

Link to comment
Share on other sites

You need a complete programming language to pull data from a URL and process it, HTML cannot do the job. If the weather site has cross-origin policy you will be able to load the data using Javascript, if not then you will need a server-side programming language. PHP is one of the easiest server-side languages to learn.

From here, it depends on which languages are available to you and how much you know about them. If you don't know any programming languages, the first step is going to be learning the language.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...