Sitemaps are files which contain links of files of some or all of the files on a website. Often, sitemaps can be seen by clicking on a link on the website. Sitemaps on websites probably contain an html file with the links. This sort of sitemap is really an index with a reinvented name to give it a web specific meaning. Another form of sitemap that can be used index webpages with Google Webmaster tools is an XML file.
XML sitemaps can be submitted to Google Webmaster Tools. XML files can be created in software such as Notepad, Dreamweaver and Adobe Framemaker. If a sitemap is to have a stylesheet it would be a XSL stylesheet.
An XML sitemap file is shown below:
<?xml version=’1.0′ encoding=’UTF-8′?><?xml-stylesheet type="text/xsl" href="https://fullstackwebstudio.com/locations/coding-blog//sitemap.xsl"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
The XML file above states the version, encoding (must be UTF-8), stylesheet link(if used) and has all links nested in between <urlset></urlset> tags. each link in the sitemap is located between <url><</url> tags.
Multiple XML Sitemaps:
If sites become very large with thousands of pages, one sitemap index file can be made that will use contain the sitemap files. The sitemaps would be made like the one shown in the previous example, while the sitemap index would have this code (without stylesheet) below:
<?xml version="1.0" encoding="UTF-8"?>
Sitemaps can be submitted to Google, Yahoo and Bing. Google even shows how many of the pages in the sitemap are indexed. One XML file can be used to index hundreds of links.
If you are concerned with the code of your xml file you can run it through W3C Markup Validation Service.