Skip to content

Instantly share code, notes, and snippets.

@hishaamn
Created August 30, 2023 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hishaamn/7827bfa27dc3a0beb4e7ea7e78f1fe36 to your computer and use it in GitHub Desktop.
Save hishaamn/7827bfa27dc3a0beb4e7ea7e78f1fe36 to your computer and use it in GitHub Desktop.
/////// FROM ///////
protected virtual XDocument BuildXmlDocument(IEnumerable<XElement> pages) => new XDocument(new XDeclaration("1.0", "UTF-8", "no"), new object[1]
{
(object) new XElement(SitemapGenerator.ns + "urlset", new object[2]
{
(object) new XAttribute(XNamespace.Xmlns + "xhtml", (object) (XNamespace) "http://www.w3.org/1999/xhtml"),
(object) pages
})
});
/////// TO ///////
protected virtual XDocument BuildXmlDocument(IEnumerable<XElement> pages) => new XDocument(new XDeclaration("1.0", "UTF-8", "no"), new object[1]
{
(object) new XElement(SitemapGeneratorExtension.ns + "urlset", new object[2]
{
(object) new XAttribute(XNamespace.Xmlns + "xhtml", (object) (XNamespace) "http://www.w3.org/2001/XMLSchema-instance"),
(object) pages
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment