您能帮我解决一些 XML 文档的问题吗?
在解析文档时,我已经到了只需要获取相关数据的地步。
这是我正在循环的一组子元素的示例:
<element type="forecast_icon_code">3</element>
<text type="precis">Partly cloudy.</text>
<text type="probability_of_precipitation">10%</text>
$(locationInfo).children().each(function(){
alert($(this).attr("forecast_icon_code"));
});
返回值为“未定义”