I want to access XML elements in the following document. There about 935 items AircraftReport. I know how to display all of them by using .find() and .each() but I am having trouble getting only the first 10 AircraftReports.
<response>
<data num_results="935">
<AircraftReport>
<latitude>50.5</latitude>
<longitude>-51.8</longitude>
</AircraftReport>
<AircraftReport>
<latitude>55.9167</latitude>
<longitude>-43.1</longitude>
</AircraftReport>
....
</data>
</response>
I am assuming I have to write that in a for loop. How can this be done with jQuery?