Skip to main content
Participant
March 17, 2008
Answered

while reading xml get error content is not allowed to prolog

  • March 17, 2008
  • 2 replies
  • 468 views
while reading xml I get error content is not allowed to prolog.
I tried removing while space, Save doc as utf-8 encoding.
What is about this encoding?
I am using XMLParse() to read document. Is there any other way I can read xml file & access it's elements in coldfusion code or what might be wrong with my xml file. Becuause it displays properly in Internet Explorer. That means it doesn't have any missed tags or simple errors for sure.
This topic has been closed for replies.
Correct answer sankalpah
thank you for your reply.

I came across some article saying if
xml tag definition & <root tag have space between them one gets this error. I also saved my files in utf-8 encoding.
I think one of that worked for me.

2 replies

sankalpahAuthorCorrect answer
Participant
March 18, 2008
thank you for your reply.

I came across some article saying if
xml tag definition & <root tag have space between them one gets this error. I also saved my files in utf-8 encoding.
I think one of that worked for me.
Inspiring
March 17, 2008
sankalpah wrote:
> while reading xml I get error content is not allowed to prolog.
> I tried removing while space, Save doc as utf-8 encoding.
> What is about this encoding?
> I am using XMLParse() to read document. Is there any other way I can read xml
> file & access it's elements in coldfusion code or what might be wrong with my
> xml file. Becuause it displays properly in Internet Explorer. That means it
> doesn't have any missed tags or simple errors for sure.
>


There was a recent thread that came to the conlclusion that this can be
a problem with BOM multi=-byte characters.

Where are you reading the XML from?