jQuery XML Parse - check if Element has attribute
Would you please help with an issue i have with some XML documents.
When parsing through the documents I am getting to a point where i need to
only acquire the pertinent data.
Here is an example of a set of child elements that I am looping:
<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"));
});
The returned value is "undefined"
No comments:
Post a Comment