XML

1. The Difference Between XML and HTML
  • XML was designed to carry data - with focus on what data is
  • HTML was designed to display data - with focus on how data looks
  • XML tags are not predefined like HTML tags are
2. Example of XML
<?xml version="1.0" encoding="UTF-8"?>
<note>
  <date format="yyyy-mm-dd">2018-12-18</date>
  <hour>21:00</hour>
  <to>N.M</to>
  <to N.M />  #the same as above
  <from>Zhang</from>
  <body>Don't forget that thing</body>
</note>
3. XML Attribute
<date format="yyyy-mm-dd">2018-12-18</date>

The thing format="yyyy-mm-dd"is the attribute, and it must always be QUOTED

4. XML Comments
<!-- This is a comment -->
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。