0

For example in Problems I have

Content is not allowed in prolog.

How to find out why its there(what eclipse plugin has put it there) and how to turn it off?

Markus Lausberg
  • 12,177
  • 6
  • 40
  • 66
IAdapter
  • 62,595
  • 73
  • 179
  • 242
  • Have you got a malformed xml file somewhere? Possibly with some text before the opening angle bracket... – serg10 Mar 02 '11 at 11:03
  • no, its not that. just some xhtml does not work in that eclipse. they are ok, eclipse has a bug. – IAdapter Mar 02 '11 at 11:14
  • can anyone tell me where i can vote down users? – Chris Mar 02 '11 at 11:43
  • @Chris: You don't enough reputation (yet) to do that. – skaffman Mar 02 '11 at 11:44
  • thanks. such a shame... i'll bookmark this question so that i dont forget to vote this down – Chris Mar 02 '11 at 11:46
  • 4
    @IAdapter: And you should know how to ask a proper question by now. Quit being a bully. – skaffman Mar 02 '11 at 11:57
  • 1
    @Chris You're now good to go. Each downvote costs 1 rep. Don't be too vindictive! – David Heffernan Mar 02 '11 at 12:37
  • 2
    @Chris: You aren't supposed to downvote *users*. You downvote (and upvote) individual questions and answers. It doesn't have anything to do with how much you like the person behind them. – Cody Gray - on strike Mar 02 '11 at 12:39
  • 1
    I know but if the question is that unclear that even the creator doesn't understand it and he votes all the answers down which he think doesn't answer his question correctly it's worth 1 of my reputation points :-) – Chris Mar 03 '11 at 12:59
  • The relevant canonical question is http://stackoverflow.com/questions/5138696/org-xml-sax-saxparseexception-content-is-not-allowed-in-prolog – Raedwald Jul 18 '14 at 10:26

4 Answers4

4

I had this problem too and it was, because i changed/saved the file in UltraEdit. After the save command, the file encoding changed and included characters, eclipse was not able to read.

You can open the file with the windows "Editor" tool and delete the characters, eclipse can not read. You will directly detect them.

Markus Lausberg
  • 12,177
  • 6
  • 40
  • 66
3

This sounds like an error with a xml file. Most of the time "Content is not allowed in prolog" means, that your XML file does not have the right format or even doesn't start the right way.

Chris
  • 7,675
  • 8
  • 51
  • 101
3

"Content is not allowed in prolog" is the error thrown by Xerces when there's something in an XML file or stream that precedes the <?xml?> declaration. There must be nothing before that, not even whitespace or a Byte-Order-Mark.

skaffman
  • 398,947
  • 96
  • 818
  • 769
2

Double-click the message and it should take you to the file (and ideally location within the file) that is the source of the problem.

This specific error sounds like you've got a malformed XML file.

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
  • no, it doesnt work. for example in warning I only have file, line and desc. I don't know why its there. – IAdapter Mar 02 '11 at 11:16