I am trying to parse an XML file with but ran into an error message invalid byte 2 of 2-byte UTF-8 sequence
invalid byte 2 of 2-byte UTF-8 sequence
The switching of the encoding for the input might help in this case:
XMLEventReader eventReader = inputFactory.createXMLEventReader(in, "utf-8" //"windows-1251" );