XML 被設(shè)計(jì)用來傳輸和儲(chǔ)存資料。

HTML 被設(shè)計(jì)用來顯示資料。

XML 屬性 語法

XML元素具有屬性,類似 HTML。

屬性(Attribute)提供有關(guān)元素的額外資訊。

XML 屬性 範(fàn)例

<messages>
<note id="501">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
<note id="502">
<to>Jani</to>
<from>Tove</from>
<heading>Re: Reminder</heading>
<body>I will not</body>
</note>
</messages>