Looking at the XML header
Am I right to state that the encoding>
I think in principle you might have a point that the encoding
statement is 'late' in the file, however, the whole first line only uses basic characters. AFAIK, those are the same in almost all encodings, so whatever you decode it as, it'll read anyway.
Whatever comes after that however, could matter. For example text in a CDATA section could be encoded in a Cyrillic encoding.