csdn_spider/blog/ds19991999/原创-- XML语言基础.md

10 lines
1.0 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 原创
XML语言基础
# XML语言基础
1. #XML声明定义版本1.0和使用编码ISO-8859-1 = Latin-1/西欧字符集1. <?xml version="1.0" encoding="ISO-8859-1"?>1. #文档**根元素** 1. <note>1. #接下来四行描述根的4个子元素1. <to>George</to>1. <from>John</from>1. <heading>Reminder</heading>1. <body>Don't forget the meeting!</body>1. #定义**根元素的结尾**1. </note>| <| <| 小于
| >| >| 大于
| &| &| 和号
| '| '| 单引号
| "| "| 双引号
1. 名称可以含字母、数字以及其他的字符1. 名称不能以数字或者标点符号开始1. 名称不能以字符 “xml”或者 XML、Xml开始1. 名称不能包含空格1. 最好使用<book_title>这种命名方式1. 属性无法包含多重的值元素可以1. 属性无法描述树结构元素可以1. 属性不易扩展为未来的变化1. 属性难以阅读和维护