8 Replies Latest reply on Mar 20, 2014 6:21 AM by beverly

    Import XML WEATHER data into FileMaker

    emtec

      I need help to import 10 day min temperatures forecasts from the National Weather Center (NOAA) into my database and comparing the results with Lab test results to give customers a warning when temps are expected to fall below the lowest lab test for each of 200 client locations in the USA.

        • 1. Re: Import XML WEATHER data into FileMaker
          wimdecorte

          The standard way of doing this is to write an XSLT to transform the Weather XML grammar into FM XML grammar so you can import it.  The "import from XML" can be pointed to the Weather URL source and you point to your XSLT in the same step.

           

          Other approaches would be to:

          - use a web viewer and scrape the contents

          - use a plugin to get the XML data and then:

            - parse it as text in a script

            - use XSLT internally to transform it into a list to work through

           

          If you have never worked with XML then you may find the web viewer scraping the easiest.  It's a pretty ugly way to go about it though.

          • 2. Re: Import XML WEATHER data into FileMaker
            nickorr

            emtec,

             

            What's the URL you're using to get the XML?  Or do you have a sample or some documentation?

             

            Cheers,

            Nick

            • 3. Re: Import XML WEATHER data into FileMaker
              Mike Duncan

              You can also use the Insert from URL script step to set a field.

               

              Also, be careful with handling XML in a web viewer when on windows. IE will give you the html for how it displays XML in a web viewer, not the raw XML itself. This only happens on windows though.

              • 4. Re: Import XML WEATHER data into FileMaker
                emtec

                Nick, I found a source at the National Weather Forecast which outlines the data available to the public and various ways to access it. The web sites is http://graphical.weather.gov/xml/

                 

                I only nead T(min) on a rolling 10 day forecast to compare against my lab data

                 

                Thanks,

                Brett

                • 5. Re: Import XML WEATHER data into FileMaker
                  beverly

                  Brett, this looks like a typical SOAP requested site. That means you need to format a REQUEST with soap headers (research SOAP, if you must). Then you get a RESPONSE (also in SOAP format). There are links to WSDL (research this, too!)

                   

                  Not to scare you, but FM does NOT make these kinds of request/responses natively. So, whether you researched these technologies or not, you likely need a plug-in to make the request and get a response. Or use your own website to make the request (PHP, perhaps), so that you can scrape the result into your database with whatever means you decide to use. Or perhaps there's another website that would allow you to post the request (via web viewer?) and scrape the result.

                   

                  If you are not using iOS (FMGo) for this, then plug-in is a really great way to get what you want (probably all parsed, too!)

                   

                  Beverly

                  • 6. Re: Import XML WEATHER data into FileMaker
                    emtec

                    Thanks Beverly, I do have my own website which could request the data (even in a page which can be hidden in the website) and then scrape the results into Filemaker. Once the data is in Filemaker, I could use a script to look at the lab data and compare the results with the forecasted numbers.

                     

                    Thanks to all in this thread for all the very valuable suggestions and advice.

                     

                    Brett

                    • 7. Re: Import XML WEATHER data into FileMaker
                      nickorr

                      Brett,

                       

                      Beverley is right, FileMaker doesn't do this stuff natively.  But you can do all of the parts that SOAP requires with a plugin like our free BaseElements plugin.  SOAP is really just a lot of extra XML to wrap the data around.  All of the extra stuff makes it simpler for applications that support SOAP to understand - in theory.

                       

                      So if you're using a plugin to access it, you just need to handle all of the parts manually.  But it can be made to work.  Let me know if you'd like me to have a go at the details for you.

                       

                      Cheers,

                      Nick

                      • 8. Re: Import XML WEATHER data into FileMaker
                        beverly

                        +1 and there are other fine plug-ins to help, too.

                         

                        NOTE: any plug-in does not work on iOS, but can often be run from FMS, then results gotten on FMGo.