I do declare! But my XML doesn't.
-
We are moving our sites from a WAMP to a LAMP and one of the XML parser classes has gone all haywire. Eeep. I love that I have another developer on my team now, but unfortunately, that means I don't know every piece of code on our sites. Kid Wonder created an app for sending our product (video based) to mobile devices using the class WURFL_PHP. He *said* he tested everything on the new server before we changed, but now that the A records are switched (something I need a third party for) the parse in his application is returning "XML error: XML declaration not finished at line 1 column 15". A Google of the error turned up a few CMS install issues, and several pages displaying the error, but nothing too useful to me. Everything was fine on the WAMP server, so I'm wondering if there's something I'm missing. (God knows I've had my head in the trees today and my grey matter isn't where it should be.) I checked out the XML doc, and it's properly formatted, as far as I can tell. (It's the doc supplied http://wurfl.sourceforge.net/wurfl.xml.) The class is well written and doesn't seem to be missing anything. XML features are all enabled in PHP. Help Mefites!
-
Answer:
Smart quotes?
foxydot at Ask.Metafilter.Com Visit the source
Other answers
check that the xml declaration is at the very begining of the doc, looks like: <?xml version="1.0"?> and has no leading spaces or newlines. It must be the absolutely very first thing in the file. Good luck!
jenkinsEar
DOS line endings?
genghis
OK, I just downloaded the file you linked to and had a look in it, and it contains neither DOS line endings nor "smart" quotes. Are you sure your parser is parsing the file you think it's parsing?
flabdablet
Are you sure your parser is parsing the file you think it's parsing? Yeah, I suspect the file is never making it into the XML parser. When I follow that link in Firefox, I get a response saying the file is over 6MB, but it stops loading and just hangs after about 5MB.
scottreynen
If the parser can't actually find the file it needs, and this has happened after moving from Windows to Linux, it might be because the Linux filesystems are case-sensitive and the Windows ones aren't. Can you chefilesystem issue. Are you sure you're not trying to parse Wurfl.xml or wurfl.XML?
flabdablet
Phew, I did a fluffer. Please ignore that typing fart.
flabdablet
Not smart quotes, but it put me on the trail. Two days ago Boy Wonder was testing another of the moved sites and had a "weird error", which was really a malformed MySQL request puking into the buffer. Because I didn't have time to figure out why his code wasn't escaping properly, I cheated my way out and turned on runtime magic quotes in PHP. Aaaaand, the magic quotes added a / before the " in version="1.0". Thanks for the brain tap guys! At least now the mobile service is running, and that's the Big Boss' favorite toy. He won't notice the malformed MySQL for a couple days! ;)
foxydot
Reason I thought it might be quote-related is because that's what's on line 1 at column 15.
flabdablet
Related Q & A:
- "Why am I unable to send out group im's with links, the link doesn't show up?Best solution by Yahoo! Answers
- Why doesn't it work when I want to click a link in my Yahoo mess list?Best solution by Yahoo! Answers
- Why doesn't my mail show up when I have new mail?Best solution by Yahoo! Answers
- What do I do if my high school doesn't offer any AP courses?Best solution by Yahoo! Answers
- How do I uninstall Yahoo messenger when it doesn't let me uninstall it?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.