xml学习笔记
对于xml语法有以下需要注意:
1. 所有xml元素必须有关闭标签。例:<p>……</p>
2. xml必须有根元素。
3. 属性值必须加引号。例:<note date="08/08/2008"
>
下面是一个例子:
![](https://images2015.cnblogs.com/blog/899945/201604/899945-20160402225526426-533910158.png)
<bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>