I'm receiving a parser error upon parsing a file containing a Byte Order Mark(BOM) and according to XML-processors it is OK to do so. I took a glance at the spec as well but I don't quite understand it fully.
I think it would make more sense to have a lexical error or maybe no error since it looks like it's acceptable.
https://www.w3.org/TR/xml/#charencoding