XML Export Error

Archived from the Xataface Users forum.

fauners — Wed Sep 07, 2011 2:42 am

Hi All

i have searched the forums looking to see if this is happening to anyone else but haven’t had any look. I’m running the latest version of xataface on xampp on windows 7 pro. It’s also the latest version of xampp with Apache 2.2.17, MySQL 5.5.8 and PHP 5.3.5.

when i press the XML export button on any of my tables i get the following error appear on screen:

XML Parsing Error: XML or text declaration not at start of entity
Location: http://localhost/cashman/CMS/index.php? … -mode=list
Line Number 3, Column 1:
<?xml version=”1.0”?>

Anyone have any idea why this is happening?

Thanks in advance

Adam


shannah — Wed Sep 07, 2011 9:22 am

This looks like a browser error. What browser are you using? Firefox, IE, Safari, etc…?
If you check “view source” you should see the XML source and perhaps there will be a clue as to what is corrupted. Can you post the beginning of said source?

-Steve


fauners — Thu Sep 08, 2011 2:55 am

Hi Steve

Thanks for the reply. I’m using firefox when the error occurs.
Just tried it on explorer and it works!
Here is the page source from firefox

Code: Select all
`<?xml version=”1.0”?>    2    1    2011-08-08    3445    234    234    324    3    1    2011-08-10    687    678    678    678

`

it looks ok on IE,it comes up as I would have expected it too, it’s just happening on firefox.

I have just tried it on a couple of networked computers and they are also having the same issue on firefox.

The IE fix will get me out of a hole anyway so thanks a lot for that, but if there is a solution to this it would be great.

Thanks

Adam


shannah — Thu Sep 08, 2011 9:30 am

Is there any whitespace at the beginning of the XML source? That XML looks valid but the error seems to indicate that there are 2 lines preceding the <?xml declation.

-Steve


fauners — Mon Sep 12, 2011 7:04 am

Hi Steve

Sorry for the delay in replying.
Yes you are right, there are 2 blank lines at the start of the source.
the <?xml version=”1.0”?> starts on line 3.

Adam


shannah — Mon Sep 12, 2011 10:24 am

Likely you have some whitespace either at the beginning or end of one of your delegate classes (or your index.php file). Best practice in PHP files is to omit the closing ?> at the end of your file so you don’t accidentally introduce whitespace. If you don’t end the PHP tag PHP will just close it at the end of the file like normal.

Also check that all of your beginning open <?php tags are at the very beginning of its file with no blank lines before it.

-Steve