检查元素时 XML 站点地图中的 HTML 标记

问题描述 投票:0回答:1

我的 Umbraco 8 XML 站点地图显示 html 标签,我不知道为什么!内容类型标头显示它是一个 text/xml 文档,但在检查元素时,页面包含 html 标记。站点地图使用 cshtml 模板,按照 Umbraco 文档创建 XML 站点地图的指示,布局 =“null”。这里可能有什么问题?这是一个问题吗?这是出于 SEO 目的,而不是供人们阅读,因此它需要是一个正确的 XML 站点地图。

Screenshot of xml view file

Screenshot of sitemap with dev tools network tab open, showing the content type header is text/xml

Screenshot of sitemap with dev tools elements tag open, showing the file contains html tags

html .net xml umbraco sitemap
1个回答
0
投票

我非常确定您看到的 HTML 来自为您显示 XML 的浏览器工具。这不是你的代码。

© www.soinside.com 2019 - 2024. All rights reserved.