title: How the video sitemap of your website should look like correctly
body: <p>I want to make a dynamic video sitemap in xml format so that it is friendly to Google robots. And I have a problem with generating the map correctly. The map opens in the browser but some elements do not appear, namely the code &quot;urlset and xmlns&quot; &quot;</p>
  <p>Below I am adding my code and a screenshot of the map displayed in the browser</p>
  <pre class="lang-cs prettyprint-override"><code>this.Response.ContentType = &quot;application/xml&quot;;
  
  using (var xml = XmlWriter.Create(this.Response.Body, new XmlWriterSettings 
  {
      Indent = true, 
      Async = true, 
      Encoding = Encoding.UTF8, 
      OmitXmlDeclaration = true, 
      NewLineOnAttributes = true, 
      CloseOutput = true 
  }))
  {
      xml.WriteStartDocument();
      xml.WriteComment(&quot;generator=\&quot;XML Sitemap &amp; Google News for .NET CORE\&quot;&quot;);
  
      xml.WriteStartElement(&quot;urlset&quot;, &quot;http://www.sitemaps.org/schemas/sitemap/0.9&quot;);
      xml.WriteAttributeString(&quot;xmlns&quot;, &quot;http://www.sitemaps.org/schemas/sitemap/0.9&quot;);
      xml.WriteAttributeString(&quot;xmlns&quot;, &quot;video&quot;, null, &quot;http://www.google.com/schemas/sitemap-video/1.1&quot;);
  
  
      xml.WriteStartElement(&quot;url&quot;);
      xml.WriteElementString(&quot;loc&quot;, &quot;mysite.com&quot;);
      xml.WriteStartElement(&quot;video&quot;, &quot;video&quot;, null);
      xml.WriteElementString(&quot;video&quot;, &quot;player_loc&quot;, null,&quot;https://sitevideo.com&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;thumbnail_loc&quot;, null, &quot;http://siteimage/default.jpg&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;title&quot;, null,&quot;example title&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;description&quot;, null, &quot;Video: A1 Sitemap Generator - build sitemaps quick demonstration&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;category&quot;, null, &quot;sitemaps&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;tag&quot;, null, &quot;sitemap&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;tag&quot;, null, &quot;generator&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;tag&quot;, null, &quot;google&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;tag&quot;, null, &quot;xml&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;tag&quot;, null, &quot;html&quot;);
      xml.WriteElementString(&quot;video&quot;, &quot;tag&quot;, null, &quot;sitemaps&quot;);
  
      xml.WriteEndElement();  //video
      xml.WriteEndElement();  //url
  
      xml.WriteEndElement(); //urlset 
      xml.WriteEndDocument();
  
      await xml.FlushAsync();
  }
  </code></pre>
  <p><img src="https://i.stack.imgur.com/1jSsH.png" alt="screenshot" /></p>
  <p>P.S. I am interested in whether the lack of these lines of code may have an impact on the indexing of such a map by google?</p>