Hi thanks for your response !!
I will be providing requirement path as an input (EG : requirement\sample requirement) and try to invoke all parent and child requirements ID and name in the mentioned path. Please let me know if you need additional info.