We are using the function getLineNumber from the R XML package. Some of our XML data files are quite large, and we inherit a bug from libxml2 limiting the returned line number to 65535 (stored in an unsigned int).
The problem is old and well-known by the library maintainers:
https://gitlab.gnome.org/GNOME/libxml2/-/issues/361
Im PHP, they overcome the problem at runtime:
Get line number for a node won't return line number larger than 65535.
https://www.php.net/manual/en/libxml.constants.php
Would it be feasible to do something similar in R?