in reply to XPathing Up level

'../../@Wid' should be '../@Wid' as Events is the direct parent of Event.

That said, I would use the same nested loop approach as yuvanbala.