tags:

views:

30

answers:

2

i've got a simple xml file (called by ajax) that contains only:

<result>1</result>

with jquery, i can get the value (1) of result?

thanks! Rob

+2  A: 
jQuery.get('myxml.xml', function(xml){
    var result = jQuery(xml).text();
    alert(result);
});
J-P
oh. i feel so stupid :-) thanks jp!
Roberto
+1  A: 
$.ajax({
    url: '/foo.xml',
    success: function(xml) {
        alert($(xml).find('result').text());
    }
});
Darin Dimitrov