RSS Validation (White Space?)
I was validating my rss feeds and noticed the following error.
line 1, column 1: XML parsing error: <unknown>:1:1: XML or text declaration not at start of entity
Checking the feed I noticed a load of white space where xml version gets echoed out. See for yourselves: https://www.uk-cpi.com/careers/jobs/rss
I have gone through the code an made sure there is no white space before this line. This has me stumped and I wondered if anyone has ever had the same/similar issue?
Here is my code:
<?php $domain = 'https://'.$_SERVER['HTTP_HOST']; $url = $domain.$_SERVER["REQUEST_URI"]; PerchSystem::set_var('domain', $domain); PerchSystem::set_var('url', $url); header('Content-Type: application/rss+xml; charset=utf-8'); echo '<'.'?xml version="1.0" encoding="UTF-8" ?'.'>'; ?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
Want to reply to this thread?Login with Perch