XML Export Error

A place for users and developers of the Xataface to discuss and receive support.

XML Export Error

Postby 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
fauners
 
Posts: 10
Joined: Fri Oct 31, 2008 6:37 am

Re: XML Export Error

Postby 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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: XML Export Error

Postby 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"?>
<record><parking_meter_lodgment id="parking_meter_lodgment?Parking_Lodgment_No=2">
   <Parking_Lodgment_No>2</Parking_Lodgment_No>
   <Parking_Meter_ID>1</Parking_Meter_ID>
   <Lodgment_Date>2011-08-08</Lodgment_Date>
   <Lodgment_Total>3445</Lodgment_Total>
   <Expected_Total>234</Expected_Total>

   <Lodgment_Difference>234</Lodgment_Difference>
   <PM_Lodgment_Comment>324</PM_Lodgment_Comment>
</parking_meter_lodgment>
<parking_meter_lodgment id="parking_meter_lodgment?Parking_Lodgment_No=3">
   <Parking_Lodgment_No>3</Parking_Lodgment_No>
   <Parking_Meter_ID>1</Parking_Meter_ID>
   <Lodgment_Date>2011-08-10</Lodgment_Date>

   <Lodgment_Total>687</Lodgment_Total>
   <Expected_Total>678</Expected_Total>
   <Lodgment_Difference>678</Lodgment_Difference>
   <PM_Lodgment_Comment>678</PM_Lodgment_Comment>
</parking_meter_lodgment></record>


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
fauners
 
Posts: 10
Joined: Fri Oct 31, 2008 6:37 am

Re: XML Export Error

Postby 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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: XML Export Error

Postby 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
fauners
 
Posts: 10
Joined: Fri Oct 31, 2008 6:37 am

Re: XML Export Error

Postby 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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 24 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved