Page 1 of 1

problem with XML sitemap

Posted: Wed Jan 05, 2011 10:30 am
by someguyhere
Within a script I'm working on, a page is added to the site map. When I view the site map in a browser, there is a line break that shouldn't exist before and after the url, as such:

Code: Select all

<urlset>
−<url>
  −<loc>
  http://domain.org/test-page-407.htm
  </loc>
  <lastmod>2011-01-05 10:19:02</lastmod>
  <changefreq>monthly</changefreq>
  <priority>0.5</priority>
</url>
If I click view source, the line breaks are gone:

Code: Select all

<url>
<loc>http://domain.org/test-page-407.htm</loc>
<lastmod>2011-01-05 10:19:02</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
If it makes a difference, here are the first two lines of the site map:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
Any idea what's causing it? Does it matter?

Re: problem with XML sitemap

Posted: Tue Jan 11, 2011 8:57 pm
by josh
Your browser is formatting it. Its an XML document, not a TXT document. Keep that in mind. For example some browsers show a blog like user interface when viewing RSS feeds, rather than showing the code.

Re: problem with XML sitemap

Posted: Wed Jan 12, 2011 6:20 am
by someguyhere
Ahh...ok, thx :)