Page 1 of 1
creating google xml site map at localhost?
Posted: Mon Jul 05, 2010 10:37 am
by mayanktalwar1988
i want to create xml site map to be submitted to google want to create it at localhost offline i mean...tommorow i craeted one google denied it saying it cantains html code...i just created it fetching link from database and outputting them with google sitemap format...now how to create valid xml site map..i can create the links from database..but xml i dont know
Re: creating google xml site map at localhost?
Posted: Mon Jul 05, 2010 1:07 pm
by Apollo
What do you mean "outputting them with google sitemap format ... but xml i dont know", considering the fact that google's sitemap format is xml?
Re: creating google xml site map at localhost?
Posted: Mon Jul 05, 2010 8:31 pm
by mayanktalwar1988
outputting the links with the format means i outputted them with the help of php and html in a format of sitemap..and i just copied the text considering it will work but gogle said its a html even when i submitted text not the page source of the format..just tell me what to do craete sitemap ?
Re: creating google xml site map at localhost?
Posted: Tue Jul 06, 2010 1:03 am
by Apollo
It's quite easy to find with with google....
http://www.sitemaps.org/protocol.php
Re: creating google xml site map at localhost?
Posted: Tue Jul 06, 2010 1:10 am
by mayanktalwar1988
apollo i know the format and everything the thing is that i used <br/> tags to separate the links different links. i outputted in browser the same format like you shown and copied it and submitted it google rejected it saying it has html in it
Re: creating google xml site map at localhost?
Posted: Tue Jul 06, 2010 3:21 am
by Apollo
mayanktalwar1988 wrote:the thing is that i used <br/> tags to separate the links different links.
Well then you're not following the official format, cause there shouldn't be any <br/> tags in there
Note that you see multiple lines in the example xml on that site, this does NOT mean there are <br> tags in there. Only in HTML (i.e. something that is meant to be displayed in a browser), <br> means a line break.
In XML you can use "\n" characters (like most text based formats) or simply no linebreaks at all. XML does not depend on lines, so you could just as well concatenate everything without any breaks or whitespace whatsoever:
[text]<url><loc>
http://www.example.com/</loc><lastmod>2 ... l><loc>etc...[/text]
Re: creating google xml site map at localhost?
Posted: Tue Jul 06, 2010 5:34 am
by mayanktalwar1988
ok thanks now no line formatting
