So I have this JS code:
var messages = xml;
console.log( messages );
which returns this:
<messages test='foo'></messages>
How do I get "test", considering that the following does not work?
$(xml).find('messages').attr('test'); //returns undefined.
Thanks in advance.
Added jsFiddle: http://jsfiddle.net/yJy8L/1/