Can anyone explain this strange behaviour in jQuery? I'm using version 1.5.2.
var myxml = '<photo><Point srsName="EPSG:4326"><coordinates>0.153933,52.204674</coordinates></Point><id>24917</id><latitude>52.204674</latitude><longitude>0.153933</longitude><feature>3</feature><caption>No parking.</caption><url>http://www.google.co.uk</url><imageUrl>http://www.google.co.uk</imageUrl><thumbnailUrl>http://www.google.co.uk</thumbnailUrl><thumbnailSizes>60|120|150|180|200|250|300|350|400|400|425|450|500|640</thumbnailSizes></photo>';
console.log($(myxml).find('latitude').text());
console.log($(myxml).find('caption').text());
latitude prints the correct value, but caption is an empty string.
I've tried using nodeName as well, but I get the same result.
Any ideas? Thanks!
UPDATE: I've also made a jsFiddle to show the behaviour: http://jsfiddle.net/w8Z7z/