Quote:i couldn't find a library that will get me the line numbers.
The reason is that the line number is meaningless. the lines and indentation exist only to help the reading by humans.
Technically, an XML can be a single line. That is why nobody care about line numbers.
If you really want to use line numbers, I fear you will have to build your own solution.