I have an xml with utf8 encoding.
And this file contains BOM a beginning of the file.
So during parsing I am facing with org.xml.sax.SAXParseException: Content is not allowe
This has come up before, and I found the answer on Stack Overflow when it happened to me. The linked answer uses a PushbackInputStream to test for the BOM.