Peter - 2018-01-07

Hi,

I'm trying TinyXML for the first time and I love it.
I was looking for a quick solution since I'm having to deal with larger binary files that happen to start with an XML header.

As a test I simply used the LoadFile() method and opened the complete file, rather than copying the header into a buffer and use the Parse() function.

This seems to work well. No error is reported and when I use the SaveFile() function, as a test, a proper xml is created with only the header data.

I was wondering how safe this is though and if I should not copy the header to a buffer instead ?
I know that the header can never be bigger than 128 KB, yet the entire file can easily grow up to a few GB.
Can I also safely assume the parser stops when it finds the closing tag rather than try to parse the entire, say 4 GB, file, which would take a lot of time and effort.

Thx,
Peter