I am using jQuery to grab results from a webservice(3rd party can't change). A result set is something like:
<result>
<contactId>1234</contactId>
<contactState>9</contactState>
<contactStateSortOrder>5</contactStateSortOrder>
<address>
<addressId>568</addressId>
<contactId>9801</contactId>
</address>
</result>
Now I am using
$('result', xml).each(function() {
$("contactId", this).text();
});
to get the contact id out and doing what i need to do however the end result is 12349801 all i would like is the 1234. Any ideas?
Thanks in advvace