<分区>
这种 XML 数据的正确格式是什么?它们是等效的还是两者之间有取舍?
1.
<sitemap>
<category name="Animals">
<section title="Dogs">
<page url="/pics/greatdane.jpg" title="Great Dane"/>
</section>
</category>
</sitemap>
2.
<sitemap>
<page>
<category>Animals</category>
<section>Dogs</section>
<title>Great Dane</title>
<url>/pics/greatdane.jpg</url>
</page>
</sitemap>
我已经用我的样式表实现了第一个例子,它似乎工作正常,但我不确定正确的形式应该是什么。