XML Extraction

So I have gotten so far but im stuck again

I have a for each loop running through the “pair:ApplicationCorrespondenceData”
but some of them have 2 sets of DocumentData.
Im writing to a datatable, so I would need the header data the same for each row, but the doc data on seperate rows.
I’d have to loop again, but how do I do this