fetch attribute data from Item xml

Hi all,

I am new to aras. i have a xml of item

    <Item type="Aras_abc" id="2DE6D89F95914A11BC0F50FE38F1BAAB" action="add" loaded="1" levels="1" isTemp="1" typeId="290D70A781564CC889F16344767CC6A7"              LastModifiedOn="1620903746992" isDirty="1">

    <has_higher_rev>0</has_higher_rev>

    <major_rev>A</major_rev>

    <owned_by_id keyed_name="Innovator Admin">DBA5D86402BF43D5976854B8B48FCDD1</owned_by_id>

    </Item>

 i can query properties like this

let majorRev  =   window.item.selectSingleNode('./major_rev')

but i want to query attribute like 'type' or 'action'.

so how do we do it.?