Welcome to WebmasterWorld Guest from 54.226.62.251

Forum Moderators: httpwebwitch

Message Too Old, No Replies

XML generation is giving error

     

swatej

1:14 pm on Jul 15, 2008 (gmt 0)

5+ Year Member



Hello

I am facing a problem with XML. When I execute following URL it gives error while on this page only simple rss feed node are created and echoed at the end of the page. But some how It gives error. More i have tried to remove first 2 lines which are blank but i can not. Please some body help me out.

Thank You.

edited by: httpwebwitch - URL removed

[edited by: httpwebwitch at 2:27 pm (utc) on July 15, 2008]
[edit reason] URL removed [/edit]

httpwebwitch

2:29 pm on Jul 15, 2008 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Hi swatej,
Can you describe the error you're getting?
To answer your question we'll need a lot more detail.

and please don't link to broken works in progress, thanks :)

swatej

5:07 am on Jul 16, 2008 (gmt 0)

5+ Year Member



Hi httpwebwitch,
Thanks for giving quick reply.
It gives following Error:

XML Parsing Error: xml declaration not at start of external entity
[url removed]
Line Number 4, Column 1:

[edited by: httpwebwitch at 5:45 am (utc) on July 16, 2008]
[edit reason] removed url [/edit]

httpwebwitch

2:18 pm on Jul 16, 2008 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The xml declaration does need to be at the very beginning of the code - with no whitespace before it.
So you must hunt and destroy those blank lines.

>> i have tried to remove first 2 lines which are blank but i can not

Is this an RSS feed you are creating, or one you're consuming? And what server platform/language are you working with? (PHP, ASP, VB, ColdFusion... ?)

swatej

4:59 am on Jul 17, 2008 (gmt 0)

5+ Year Member



This is RSS feed we are creating using PHP plateform.

httpwebwitch

11:45 am on Jul 17, 2008 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



aah. Then truly, somewhere, there are some blank lines. The hunt is on. Often it's only that someone, hidden in some remote included library, left a line break before the "<?php" or after the the "?>" .

Good luck!

swatej

12:08 pm on Jul 17, 2008 (gmt 0)

5+ Year Member



Thanks for your quick reply. I will try to find out at my end. Thanks once again.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month