Thank you so much for your time and prompt responses.
I noticed too that the paths are stored in the XMP metadata. But the problem I am facing is mapping these paths to the SOs in my layers.
E.g I have the below layers in my file:
Layer1 comprising LinkedSO1
Layer2 comprising LinkedSO2
Layer3 comprising EmbeddedSO1
Layer4 comprising LinkedSO3
I noticed that In the XMP, the paths will appear in the order
LinkedSO3_Path
LinkedSO2_Path
LinkedSO1_Path
Now for mapping these paths to the layers, my script has to be knowledgeable enough to skip Layer3, as it has an Embedded SO. That's where I am stuck with this approach as I am unable to distinguish between linked and embedded SOs .