I have an XML file formatted like this:
<location city="21449" city_name="Branson" state="MO">
<forecast day_sequence="1" day_of_week="5" weekday="Thursday" daylight="D" date="040104" high_temp="18.09" low_temp="3.09" sky_desc="1" sky="Sunny" precip_desc="*" precip="" temp_desc="8" temp="Mild" air_desc="*" air="" description="Sunny. Mild." uv_index="5" uv="Moderate" wind_speed="9.26" icon="1" icon_name="sunny" />
<forecast day_sequence="2" day_of_week="6" weekday="Friday" daylight="D" date="040204" high_temp="18.09" low_temp="4.20" sky_desc="1" sky="Sunny" precip_desc="*" precip="" temp_desc="8" temp="Mild" air_desc="*" air="" description="Sunny. Mild." uv_index="5" uv="Moderate" wind_speed="11.11" icon="1" icon_name="sunny" />
<forecast day_sequence="3" day_of_week="7" weekday="Saturday" daylight="D" date="040304" high_temp="17.99" low_temp="5.21" sky_desc="7" sky="Passing clouds" precip_desc="*" precip="" temp_desc="8" temp="Mild" air_desc="*" air="" description="Passing clouds. Mild." uv_index="5" uv="Moderate" wind_speed="16.67" icon="2" icon_name="mostly_sunny" />
<forecast day_sequence="4" day_of_week="1" weekday="Sunday" daylight="D" date="040404" high_temp="19.75" low_temp="7.99" sky_desc="9" sky="Scattered clouds" precip_desc="*" precip="" temp_desc="8" temp="Mild" air_desc="*" air="" description="Scattered clouds. Mild." uv_index="5" uv="Moderate" wind_speed="19.44" icon="2" icon_name="mostly_sunny" />
<forecast day_sequence="5" day_of_week="2" weekday="Monday" daylight="D" date="040504" high_temp="15.95" low_temp="6.51" sky_desc="17" sky="Cloudy" precip_desc="2" precip="Sprinkles" temp_desc="7" temp="Refreshingly cool" air_desc="*" air="" description="Sprinkles. Cloudy. Refreshingly cool." uv_index="0" uv="Minimal" wind_speed="18.52" icon="18" icon_name="showers" />
<forecast day_sequence="6" day_of_week="3" weekday="Tuesday" daylight="D" date="040604" high_temp="18.73" low_temp="6.97" sky_desc="26" sky="Increasing cloudiness" precip_desc="*" precip="" temp_desc="8" temp="Mild" air_desc="*" air="" description="Increasing cloudiness. Mild." uv_index="3" uv="Low" wind_speed="19.44" icon="4" icon_name="partly_cloudy" />
<forecast day_sequence="7" day_of_week="4" weekday="Wednesday" daylight="D" date="040704" high_temp="18.08" low_temp="6.51" sky_desc="27" sky="Decreasing cloudiness" precip_desc="50" precip="Sprinkles early" temp_desc="8" temp="Mild" air_desc="*" air="" description="Sprinkles early. Decreasing cloudiness. Mild." uv_index="3" uv="Low" wind_speed="21.30" icon="18" icon_name="showers" />
</location>
I need to pull all of the data from each element (i.e. day_sequence="7") and place them into a text file (in a nice orderly fashion) so another program can access them. Also, the XML file is updated every 6 hours, and I would like this script to update the text file when the XML file changes. I need to do this in VBScript (.vbs). Please help, I only need suggestions and ideas and maybe code samples; I don't want someone to just give me the complete answer.
Start Free Trial