我有一个XML站点地图。在结束标记和开始标记之间是否需要空格?例如应该这样:
/><
实际上是:
/> <
还是都没事?
这是一个没有空格的代码块的例子:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>http: //www.ospreyeurope.com/che_de/hiking/tempest-series</loc><lastmod>2016-07-20</lastmod><changefreq>daily</changefreq><priority>0.5</priority><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/eu_en/hiking/tempest-series" hreflang="en" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/che_de/hiking/tempest-series" hreflang="de-ch" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/che_fr/hiking/tempest-series" hreflang="fr-ch" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/che_it/hiking/tempest-series" hreflang="it-ch" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/be_fr/hiking/tempest-series" hreflang="fr-be" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/dk_en/hiking/tempest-series" hreflang="en-dk" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/de_de/hiking/tempest-series" hreflang="de-de" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/es_es/hiking/tempest-series" hreflang="es-es" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/fi_en/hiking/tempest-series" hreflang="en-fi" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/fr_fr/hiking/tempest-series" hreflang="fr-fr" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/ie_en/hiking/tempest-series" hreflang="en-ie" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/it_it/hiking/tempest-series" hreflang="it-it" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/lu_fr/hiking/tempest-series" hreflang="fr-lu" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/nl_en/hiking/tempest-series" hreflang="en-nl" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/no_nb/hiking/tempest-series" hreflang="nb-no" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/at_de/hiking/tempest-series" hreflang="de-at" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/se_sv/hiking/tempest-series" hreflang="sv-se" /><xhtml:link rel="alternate" href="http://www.ospreyeurope.com/gb_en/hiking/tempest-series" hreflang="en-gb" /></url>
答案 0 :(得分:0)
XML允许在元素之间出现空格;由应用程序决定这样的空白是否重要。在站点地图的情况下,这样的空白是无关紧要的。