我正在通过评论网站获取 XML 数据,但我需要为此添加丰富的代码段,以便谷歌可以显示评分,但我找不到确切的示例
这是 XML 的一部分
<reviewDetails>
<reviewDetail>
<score>5</score>
<scoremax>5</scoremax>
<text>
<![CDATA[Something something something.]]>
</text>
<user>
<![CDATA[Person]]>
</user>
<id>1494839</id>
<createdate>20160420</createdate>
<beveeltAan>
<![CDATA[ja]]>
</beveeltAan>
<reviewID>1494839</reviewID>
<reviewDatum>20160420</reviewDatum>
<questions>
<question>
<label>
<![CDATA[Verkooptraject]]>
</label>
<score>-1</score>
<order>1</order>
<type>
<![CDATA[score]]>
</type>
</question>
<question>
<label>
<![CDATA[Informatie op SiteToGo.nl]]>
</label>
<score>-1</score>
<order>2</order>
<type>
<![CDATA[score]]>
</type>
</question>
<question>
<label>
<![CDATA[Communicatie website bouwer]]>
</label>
<score>-1</score>
<order>3</order>
<type>
<![CDATA[score]]>
</type>
</question>
<question>
<label>
<![CDATA[Bereikbaarheid]]>
</label>
<score>-1</score>
<order>4</order>
<type>
<![CDATA[score]]>
</type>
</question>
<question>
<label>
<![CDATA[Snelheid oplevering]]>
</label>
<score>-1</score>
<order>5</order>
<type>
<![CDATA[score]]>
</type>
</question>
<question>
<label>
<![CDATA[Prijs-/kwaliteit verhouding]]>
</label>
<score>-1</score>
<order>6</order>
<type>
<![CDATA[score]]>
</type>
</question>
</questions>
<kooptvakeronline></kooptvakeronline>
<geslacht>
<![CDATA[vrouw]]>
</geslacht>
<leeftijd>0</leeftijd>
<gekochtproduct></gekochtproduct>
<companyResponse></companyResponse>
<filterCode></filterCode>
</reviewDetail>
<reviewDetail>
那么我如何在此 xml 中添加丰富的代码段,以便谷歌能够在我的网站上显示评级。
最佳答案
在我们提供建议之前,您需要展示一些进展。 这是我建议您执行的操作。
- 转到 schema.org ( http://schema.org/docs/full.html ) 并确定与您的 XML 数据相关的类型。
- 确定类型后,查找与 XML 源中使用的术语含义相同的属性。
- 使用 schema.org 上的相关示例并将它们应用于您修改后的数据(步骤 1 和 2)。
- 显示第 1-3 步的结果,并要求进一步说明如何改进结果或处理 Google 结构化数据测试工具 (https://developers.google.com/structured-data/testing-tool/) 显示的错误消息。
关于asp.net - 如何在网站中添加丰富网页摘要?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36763186/