Is there a way to customize the data that comes through the .xml file?

  • 1
  • Question
  • Updated 6 years ago
I'm looking to import just a few small pieces of information from my 10 day forecast. I need only the date, location, high temp (in Fahrenheit), and low temp (in Fahrenheit) to import into my access database. I'm not sure where to begin because when i import the data it gives me a ton of tables with alot of extra data that would be time consuming to delete given the number of times i will have to perform this action. Can someone point me in the right direction?
Photo of iphoneded

iphoneded

  • 3 Posts
  • 0 Reply Likes
  • so so sad

Posted 6 years ago

  • 1
Photo of Timmead

Timmead

  • 6 Posts
  • 0 Reply Likes
No, you have to parse the xml yourself to retrieve only the useful information you require.
Photo of iphoneded

iphoneded

  • 3 Posts
  • 0 Reply Likes
is there a way to parse this information without having to save and edit the xml file to point to a xslt file everytime? I need this to be mostly automated, otherwise it defeats the purpose of what i'm trying to accomplish with my database. I'm using Access 2010 if that helps.
Photo of EricSpittle

EricSpittle

  • 15 Posts
  • 2 Reply Likes
Yes, VBA - Visual Basic for Applications. Out of curiosity what is it you are trying to do? If you're trying to record historical information why not just use the historical part of the API to read that information? If you're trying to just record certain data you are far better off setting up a small web app and using a CRON job to periodically pull the XML/JSON and put it into a database than trying to do it locally through Access.
Photo of iphoneded

iphoneded

  • 3 Posts
  • 0 Reply Likes
I'm not actually recording historical data, i'm recording data for the next 10 days (highs and lows). I've had a small amount of luck parsing the data with XSL Transform in Access 2010 however it seems to only want to import the last value instead of them all (working to find my error). I assume it's a problem with the XSLT file i created. I honestly wouldn't know where to begin developing a small web app either as i have no previous experience and have taught myself everything up to this point.
Photo of EricSpittle

EricSpittle

  • 15 Posts
  • 2 Reply Likes
Hmmm... do you have access to a web server with PHP and mySQL? I've been thinking about making a program that takes a 10 day forecast every day and then compares its accuracy over time. I can probably help, but my experience is all in PHP.