через DOM
<?xml version="1.0"?>
<methodResponse>
<names>
<item>
Igor
</item>
<item>
Gena
</item>
</names>
<text>
bla-bla-bla
</text>
</methodResponse>
<script>
window.onload = function () {
var obj = {
names: [],
text: ''
}
var mr = document.getElementsByTagName('methodResponse')[0];
var items = mr.getElementsByTagName('names')[0].getElementsByTagName('item');
var len = items.length;
for (var i = 0; i < len; i++) {
obj.names.push(items[i].innerHTML.replace(/\s/g, ''))
}
obj.text = mr.getElementsByTagName('text')[0].innerHTML.replace(/\s/g, '');
alert('names: [' + obj.names + ']\n text: ' + obj.text)
}
</script>