Like in this question I am trying to record the exact position when parsing XML.
I already use the SAX Locator
passed to setDocumentLocator()
to record the line and column number but that doesn't give the offset from the beginning of the file. Is there a way to find the number of bytes read so far by the SAX parser or offset of each line without re-reading the whole file?