xml我有白天和黑夜時間,所以我需要使用mod 2 = 1來獲取每個集合日期的奇數dailyforecast
。但是當我這樣做時,它給了我整個10天的預測,我只想要5天。要設置5天,我知道我必須使用position < 5
,但我不知道如何暗示與mod 2 = 1
。任何幫助都可以做到,希望這個細節足夠詳細。以實施如何設置位置爲< 5和mod 2 = 1
<forecast>
<dailyforecast>
<hightemp>
</hightemp>
</dailyforecast>
<lowtemp>
</lowtemp>
<dailyforecast>
<hightemp>
</hightemp>
</dailyforecast>
<dailyforecast>
<lowtemp>
</lowtemp>
</dailyforecast>
<dailyforecast>
<hightemp>
</hightemp>
</dailyforecast>
<dailyforecast>
<lowtemp>
</lowtemp>
</dailyforecast>
<dailyforecast>
<hightemp>
</hightemp>
</dailyforecast>
<dailyforecast>
<lowtemp>
</lowtemp>
</dailyforecast>
<dailyforecast>
<hightemp>
</hightemp>
</dailyforecast>
<dailyforecast>
<lowtemp>
</lowtemp>
</dailyforecast>
<dailyforecast>
<hightemp>
</hightemp>
</dailyforecast>
</forecast>
並不讓我使用'<' – smiller48 2014-09-04 15:42:00
但它的確讓我用'的'謝謝我只是不知道該怎麼寫它! –
smiller48
2014-09-04 15:45:11