With MuleSoft, you use the SAX parser to parse XML content and get an error like the below in the mule_ee log file:
[Fatal Error] :1:2: Content is not allowed in prolog.
The Mule SAX parser error that "Content is not allowed in the prolog" happens when trying to parse XML content that is not valid XML and normally refers to a different encoding or BOM before the XML declaration or invalid text such as:
1. The different encoding causes the error, and it occurs because the file encoding format is not correct.
2. Many text editors auto-add BOM to the UTF-8 file.
3. At the beginning of the XML declaration, any text will cause the "Content is not allowed in prolog" error
1. You might add a JVM system property file.encoding=UTF-8 to ensure that UTF-8 is the encoding format or whatever you need. You can specify -Dfile.encoding=UTF-8 when invoking the application
2. Remove the BOM from the UTF-8 file
3. Delete any text before the XML declaration
001121683

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.