converter o nome denodemap para objeto
//Element.attributes returns NamedNodeMap, to convert this into an Object
Object.assign({},...Array.from(element.attributes, ({name, value}) => ({[name]: value})))
Envious Echidna