Fix newline handling on Windows

This was causing the offset/lengths to be wrong since the
XML parser was counting the carriage returns that
windows injected as the file was read.

Type: Bug Fix