I have a piece of code to generate xpath for a node. But it doesn't create array structure of it. For example, if an element has two elements with same name, I need to provide index to point to them appropriately. An illustration of it is below.I have a piece of code to generate xpath for a