学习XML基础知识,了解常用XML编辑器,掌握数据标记语言的核心概念
XML(可扩展标记语言)是一种用于存储和传输数据的标记语言。它被设计用来传输和存储数据,而不是显示数据。
XML具有以下特点:
XML文档通常以XML声明开始:
<?xml version="1.0" encoding="UTF-8"?>
XML元素由开始标签、内容和结束标签组成:
<book category="fiction">
<title>Harry Potter</title>
<author>J.K. Rowling</author>
</book>
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications with XML.</description>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
<description>A former architect battles corporate zombies.</description>
</book>
</catalog>