0

I am using TestNg 6.3 with eclipse sdk version 3.7.1 I am getting an error in xml file and the error is org.xml.sax.SAXParseException: Content is not allowed in prolog. can i know why this occurs and any modifications can u plz suggest

  • See http://stackoverflow.com/questions/2599919/java-parsing-xml-document-gives-content-not-allowed-in-prolog-error for more, but first hint: does the XML file begin with `` (or similar)? – millhouse Oct 19 '11 at 04:49
  • Oh - and make sure your file **really is** UTF-8 encoded. – millhouse Oct 19 '11 at 04:50
  • possible duplicate of [org.xml.sax.SAXParseException: Content is not allowed in prolog](http://stackoverflow.com/questions/5138696/org-xml-sax-saxparseexception-content-is-not-allowed-in-prolog) – Raedwald Jul 18 '14 at 09:27

1 Answers1

0

Seems like the XML is not well formed or there is something wrong with the encoding of the file. I remember I had this error a lot with XSLT when it was not in UTF-8. Encoding is found via selecting file, context menu, and the properties. If this does not help, please share part of your XML.

Henk de Vries
  • 748
  • 7
  • 8