Indigo Rose Software
Indigo Rose Software
Log in to the Customer Portal Customer Login
Software Development Discussion Forums Forums
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 29
  1. #1
    Join Date
    Feb 2006
    Posts
    312

    Weather XML Help

    Sorry if this thread shows up a few time - Had problems posting.

    Anyhow, attached is an app I found in the forums. It the Weather Project - I added my key and tested - nothing happens. I tested without the key, which I think is suppose to work from reading the thread. Same result does not work. Is there something missing like a plugin? tried searching for an XML plugin - AMS 7 has then built it!???


    Thanks
    Attached Files

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,609
    yea; doesn't work for me either; but it doesn't complain about a missing plugin.
    I'd use any of hte other weather apps over trying to fix this -- this has very limited abilities -- and the weather channel does not update "real time"


    (Click here to contact me)
    Providing Independent Professional Consulting Services for IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)
    Do you wave? Find me at josh.assing @ googlewave.com

  3. #3
    Join Date
    Feb 2006
    Posts
    312
    What other weather apps. I was looking to easily populate current weather with image in my app - Something without advertisments. Any suggestions? Thanks

  4. #4
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,609
    Well; if you want to add weather to your current app; that is a bit different than just "getting the weather".

    I had produced a COM dll years ago that fetched data from WeatherBug (i wrote it becuase weatherbug was known for spyware) -- while it died a slow death by very low "payment to support" ratio.... The concept is easy.

    Look at "weatheroryou.com" -- you can look at hte websites by location and the data -- and then just do an HTTP.Download() or HTTP.Submit() to grab some html -- then parse off the data. Once you "see" the data in the html; you'll see how easy it is to parse.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)
    Do you wave? Find me at josh.assing @ googlewave.com

  5. #5
    Join Date
    Feb 2006
    Posts
    312
    Thanks for the quick response!

    You lost me at parse the data. Do you have an example? Can I purchase your COM dll?

  6. #6
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,609
    Most websites that post "data" in a regular form use something like (if not exactly) a table. So you just read out the table elements. XML is just another word for HTML; it's just 'data driven' rather than 'attribute driven'.

    The weatherbug COM object has long since been abandoned - just wasn't worth the "how do I use a COM object" support calls I was getting for a shareware application that I asked very little for -- ultimately I abandoned it because the shareware model is flawed....


    Just open a weather site -- and then "view source" and look for the markers you want (like current temp -- the value like "43c" etc) and look at how you can parse it out.. use string.find() etc.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)
    Do you wave? Find me at josh.assing @ googlewave.com

  7. #7
    Join Date
    Feb 2006
    Posts
    312
    Thanks - I will give that a try!

  8. #8
    Join Date
    Feb 2006
    Posts
    312
    jassing,

    How would I parse the current weather from the attached file?
    How would you make it display current weather in AMS?
    Would I use a label or paragraph?

    Sorry, I 'm still learning! Any help would be great. Thanks again
    Attached Files

  9. #9
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,609
    Giving it a VERY quick review -- you would put it in string; then use String.Find() to look for <b class="obsTextA">
    Between that and the next </b> is "Cloudy"

    Now look for <b class="obsTempTextA"> Get between that and </b> and you get: 46.8

    look for <b class="obsTextA">Cloudy</b> a 2nd time; and then pull out what's between it and </b> and you get:

    <b class="obsTextA">Feels Like<br>40&#176;F</b>
    so now pull out everything that's between < and > and you get:
    Feels LIke 40(Degrees) F

    so in total you can get (very easily) Cloudy, 46.8 but feels like 40 detrees F

    once you get this simple bit; you can see other paterns in the website looking at random zipcodes -- they rarely change the formats.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)
    Do you wave? Find me at josh.assing @ googlewave.com

  10. #10
    Join Date
    Feb 2006
    Posts
    312
    Jassing,

    Remember I'm a newbie - I looked at the help in AMS on strings - I 'm so what confused.

    Do you have a sample on how to string the data? I 'm a visual kind of person.
    Thanks

  11. #11
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    1,259
    Here is an application where you can see how it can be done. There are always different ways to achieve similar results.

    Note that I fetch the data directly from the web site before I display the current temperature in the demo application.

    Hope this helps.
    Attached Files

  12. #12
    Join Date
    Feb 2006
    Posts
    312
    Thanks jassing - Now that I can see the code, I have a better understanding.


    Thanks again

  13. #13
    Join Date
    Feb 2006
    Posts
    312
    One more question - Is it possible to load an image depending on weather? If its raining it would load a rain image etc... I did not see where in the source code to parse that data. I see alot of images nothing specific to weather.


    Thanks again

  14. #14
    Join Date
    Feb 2006
    Posts
    312
    jassing- I think I found where the image loads from
    http://image.weather.com/web/common/...6.gif?12122006

    Would it go like this???
    string.find (http://image.weather.com/web/common/...gif?12122006);
    image = http://image.weather.com/web/common/...6.gif?12122006
    Image.Load(image)

    Or what that load the same gif everytime?

    Sorry, still confused!

  15. #15
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    1,259
    Here is an altered version of my former example which shows the temperature and the image corresponding to the weather at the chosen location.

    Ulrich
    Attached Files

Similar Threads

  1. Error inserting XML
    By TJS in forum AutoPlay Media Studio 6.0
    Replies: 6
    Last Post: 06-08-2006, 10:30 AM
  2. XML plugin Project example - XML Weather from weather.com
    By kpsmith in forum AutoPlay Media Studio 5.0
    Replies: 8
    Last Post: 06-03-2004, 05:25 PM
  3. Spotlight: XML Actions Plugin
    By Desmond in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 03-15-2004, 03:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Indigo Rose Software