How to iterate through every potential XML subelement using SQL Server

I have a large XML file of over 45K contacts and I need to iterate through their subelement transactions into a SQL table. I’ve looked at several solutions to this, using value(), node(), etc…, but no examples appear to have an XML structure close to mine:

        <ContactName>’John Doe’</ContactName>
        <Address>’123 Main Street’</Address>
        <ContactName>’Jane Doe’</ContactName>
        <Address>’567 Fake Street’</Address>
                <ProductName>’Coffee Table’</ProductName>

I need these data in a result like below:

ContactID TransactionID ProductName Cost PurchaseDate
1234 4490 Recliner 123.00 4 July 2020
1234 5678 Lamp 45.00 4 July 2020
4567 4378 Coffee Table 225.00 4 July 2018

I’ve tried a query using the following script:

EXEC sp_xml_preparedocument @idoc OUTPUT, @doc  
-- Execute a SELECT stmt using OPENXML rowset provider.  
FROM OPENXML (@idoc, '/Contacts/Contact/Transactions/Transaction',2)  
WITH (ContactID     int             '../ContactID',  
      TransactionID  int            'TransactionID',  
      ProductName   nvarchar(50)    'ProductName',  
      Cost          float           'Cost',  
      PurchaseDate  date            'PurchaseDate')

But this will return either a null for ContactID; or return only one transaction for each ContactID. But I need it to iterate and get as many transactions as exist for a contact.

Any insights would be most welcome!