2
我想解析Yahoo!天气API,我想保存这些元素的属性,以供日后使用变量:使用Applescript获取xml属性的值
<yweather:location city="Zebulon" region="NC" country="US"/>
<yweather:astronomy sunrise="6:52 am" sunset="7:39 pm"/>
<yweather:forecast day="Wed" date="7 Apr 2010" low="61" high="96" text="Partly Cloudy" code="29" />
我怎样才能做到这一点使用AppleScript?
所以,
set locationCity to [city]
set locationRegion to [reagion]
set locationCountry to [country]
set astronomySunrise to [sunriseTime]
set astronomySunset to [sunsetTime]
我想forcasts是在某种白天/日期来组织他们