Newline Before XML Document

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've read a lot of information about this error (in Firefox):

 

XML Parsing Error: xml declaration not at start of external entity

 

Basically it means that the XML did not start at the beginning of the
file.  The weird part of this is that if I save the document to a file
on the webroot and then view it that way, the XML is displayed
correctly.

 

So far I've tried using output buffering to make sure no other
information was sent before I output the XML, but that didn't work.
I've also tried replacing all return characters and newline characters,
but that also didn't work.

 

In Konqueror I get the following error message:

 

fatal parsing error: invalid name for processing instruction in line 2,
column 6

<?xml version="1.0" encoding="utf-8"?>

 

I even tried the following on the ob_get_contents():

$xml_string = substr($xml_string, strstr($xml_string, '<'));

 

Has anyone else run into this problem?  As far as I can tell this
document starts on line 1.

 

Thanks,

--

Ray Hauge

Application Development Lead

American Student Loan Services

www.americanstudentloan.com

 


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux