![](/img/trans.png)
[英]How do i build namespaces xmlns, xmlns:xsi, and schema xsi:schemalocaton in my XML via VB.net?
[英]Are the xsi and schema portions needed in an XML sitemap? What do they mean?
对于我网站的XML网站地图,我注意到不同的文章提出了不同的建议。
例如,在我的页面列表之前,一些文章建议以这种方式启动它:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
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">
在其他文章中,仅使用以下内容进行了布局:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
我是否需要包括第一个示例中的所有其他内容?
使用多余的零件或不使用多余的零件到底有什么区别?
仅当您想根据Sitemaps.org XSD验证XML(或者如果您使用其他利用XML的XML工具)时,才需要提供架构。 请参阅验证站点地图 。
如果您不需要此功能(很可能不需要,否则您可能不会问),那么使用它就足够了
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.