作者热门文章
- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
<分区>
这种 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>
我已经用我的样式表实现了第一个例子,它似乎工作正常,但我不确定正确的形式应该是什么。
我是一名优秀的程序员,十分优秀!