I'm developing an app using ZF which has a REST API. Everything is going well except that my XML has a blank character at the beginning and so the XML is breaking the rules of having the XML declaration at the beginning. I'm trying to consume this using javascript/jquery and I'm getting the following error on firebug's console:
XML Parsing Error: XML or text declaration not at start of entity
There are a number of posts on SO and other places on the web which discusses this. It is due to output buffering and I've tried using ob_flush and flush as suggested elsewhere but I just can't figure out how to do it as those posts don't mention where these should go. Maybe I don't understand output buffering properly but Can anyone tell me where exactly I need to put these calls to remove this blank character?
I'd really appreciate a response as I've spent a good few hours on this now (took me quite a while to figure out that this was the problem in the first place) and I'm going barmy over it! LOL!
Thanks