JSFiddle - React, Tailwind, and code Playground
HTML
<p>Nodename: <span id="nName"></span></p>
<p>Attributes before: <span id="attrsBefore"></span></p>
<p>Attributes after: <span id="attrsAfter"></span></p>
JavaScript
var xmlStr = "<root><item fooBar='123' bla='blo' /></root>",
$xmlDoc = $( $.parseXML( xmlStr ) ),
$item = $xmlDoc.find( "item" ),
el = $item[0];
$( "#nName" ).text( el.nodeName );
$( "#attrsBefore" ).text( $.map( el.attributes, function(a) { return a.nodeName; } ).join( ", " ) );
$item.removeAttr( "fooBar" );
$item.removeAttr( "bla" );
// No attributes should be left here
$( "#attrsAfter" ).text( $.map( el.attributes, function(a) { return a.nodeName; } ).join( ", " ) );