I know individual attributes can be retrieved with the attr() method, but I\'m trying to iterate over all of the attributes for an element. Fo
attr()
How about?
$(xml).find('item').each(function() { var attributes = $(this)[0].attributes; for (attribute in attributes) { // Do something with each attribute... } });