I can't figure this out and been messing with it for a while now.
XML:
<page name="bio">
<image imageUrl="img/bio.png" link="#"/>
<texts>
<pageText><![CDATA[blah
]]></pageText>
</texts>
</page>
jQuery
$.get('../tfile_main.xml', function(xml){
$varbioimg = $(xml).find('page[name="bio"] image');
alert($varbioimg.attr('imageUrl'));
});
this returns undefined for some reason , I also tried to find('page[name="bio"] > image')