I need to generate xml like that:
<urlset xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://blabla</loc> <video:video> <video:player allow_embed="yes">http://blablabla</video:player_loc> </video:video> </url> I can't figure out the way to work with namespaces. I can't even create urlset element properly, I'm trying:
XNamespace _defaultNamespace = "http://www.sitemaps.org/schemas/sitemap/0.9"; XNamespace _videoNameSpace = "http://www.google.com/schemas/sitemap-video/1.1"; new XElement("urlset",new XAttribute(_defaultNamespace+"video",_defaultNamespace)) and it generates:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <urlset p1:video="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:p1="http://www.sitemaps.org/schemas/sitemap/0.9"> what's that p1 thing?