I have the following:
jQuery.ajax({
type: "GET",
url: "website/Function",
data: '&link=' + link,
contentType: "application/text; charset=utf-8",
dataType: "text",
success: function (data) {
var Link = data.toString();
$('link').val(Link);
}
});
The value from link will be something like:
xml version="1.0" encoding="utf-8"?><string xmlns="http://tempuri.org/">blah /string
How can I manipulate this return value just to extract ‘blah’?
‘blah’ can be dynamic
Thanks to anyone who helps.
To build off of ulvund’s answer: use jQuery.parseXML():
jsfiddle
This is basically taken right off of jQuery’s demo for parseXML()