get xml values with jquery -


what i'm trying achieve values contain "/photovit_action" , each of values used in img tag display images using link provided.

this xml: pastebin link

and jquery:

$.ajax({     url: "http://test.be",     type: "post",     datatype: "xml",     data: soapmessage3,     crossdomain: true,     contenttype: "text/xml; charset=\"utf-8\"",     processdata: false,     success: function (xml) {         $(xml).find('item').each(function () {             var url = $(this).find("value:contains('/photovit_action')").text();             alert(url);              $('#test').append('<img src="http://test.be/' + url + 'canvash(180)w(186)">');         });     } }); 

any ideas on how this?

thanks in advance.

in case there no value element selector wrong

$(xml).find('item:contains("photovit_action")').each(function () {     var url = $(this).text();     $('#test').append('<img src="test.be/'; + url.replace('thumbstring/', '') + 'canvash(180)w(186)">'); }); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -