I am certain to get many snarky "Didn't you Google that!" responses but I just can not find a tool, plugin, or command to get the xpath at for the current cursor position. I have found at least two that will allow me to move the cursor to a new location in file based on a given xpath which is the exact opposite of what I want to do.

The one caveat is that it has to be formatted XML. IE each child node has to be indented more than its parents. I honestly don't work in XML much; I made this for a coworker. Therefore if you want to address this limitation either open an issue or make a pull request.

Also note that it doesn't have the [4] index at the end of each level because my coworkers said that would actually be counterproductive, and they would just have to strip it out every time they copy a path.