Java parsing XML document gives “Content not allowed in prolog.” error [duplicate]

Please check the xml file whether it has any junk character like this �.If exists,please use the following syntax to remove that.

String XString = writer.toString();
XString = XString.replaceAll("[^\\x20-\\x7e]", "");

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)