📄 contents.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> <link rel="stylesheet" type="text/css" href="../CSS/tutorial.css"></link> <title>XML 教程 - 目录</title> <base target="_top"></base> </head> <body> <table width="100%"> <tr> <td><span class="mediumText"><a class="naviBlack" target="_top" href="../General/contents.html">English</a> | <a class="naviBlack" target="_top" href="../General_cze/contents.html">česky</a> | <a class="naviBlack" target="_top" href="../General_spa/contents.html">Español</a> | <a class="naviBlack" target="_top" href="../General_por/contents.html">Português</a> | <a class="naviBlack" target="_top" href="../General_tur/contents.html">Türkçe</a> | <a class="naviBlack" target="_top" href="../General_dut/contents.html">Nederlands</a> | <a class="naviBlack" target="_top" href="../General_rus/contents.html">По-русски</a> | <a class="naviBlack" target="_top" href="../General_ger/contents.html">Deutsch</a> | <a class="naviBlack" target="_top" href="../General_fre/contents.html">Français</a> | <a class="naviBlack" target="_top" href="../General_ita/contents.html">Italiano</a> | <b>>> 中文 <<</b></span></td> <td style="text-align:right"><span class="mediumText"><a class="naviBlack" target="_top" href="http://www.zvon.org">ZVON</a> > <a class="naviBlack" target="_top" href="http://www.zvon.org/index.php?nav_id=tutorials">Tutorials</a> > <b>XML Tutorial</b></span></td> </tr> </table> <table class="bar" width="750px" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="naviBlue"><a class="naviWhite" target="_top" href="../General_chi/book.html">介绍</a> / <a class="naviWhite" target="_top" href="http://zvon.org/search.php">搜索</a> / <a class="naviWhite" target="_top" href="http://www.zvon.org"> ZVON </a></td> </tr> </table><br></br><h3>目录</h3> <table border="0" cellpadding="5" cellspacing="0"> <tr> <th class="d1"><a class="indexExample" href="../Output_chi/example1.html"> 实例 1 </a></th> <td class="d1"><a name="1"></a>XML文档必须包含一个或多个元素 </td> </tr> <tr> <th class="d0"><a class="indexExample" href="../Output_chi/example2.html"> 实例 2 </a></th> <td class="d0"><a name="2"></a>根元素, 或者叫做文档元素必须是独一无二的, 并且不能被其它元素所包含 </td> </tr> <tr> <th class="d1"><a class="indexExample" href="../Output_chi/example3.html"> 实例 3 </a></th> <td class="d1"><a name="3"></a>一个元素的起始标签和结束标签的名字必须相匹配, 并且标签名是大小写敏感的 </td> </tr> <tr> <th class="d0"><a class="indexExample" href="../Output_chi/example4.html"> 实例 4 </a></th> <td class="d0"><a name="4"></a>如果元素的起始标签在另一个元素里面, 则结束标签也必须在同一个元素里.简单的说就是, 元素标签必须正确的嵌套, 不允许出现交叉嵌套的情况. </td> </tr> <tr> <th class="d1"><a class="indexExample" href="../Output_chi/example5.html"> 实例 5 </a></th> <td class="d1"><a name="5"></a>所有以起始标签开始的元素都必须以与起始标签同名的结束标签作为结束, 在起始和结束标签中间的文本是元素的内容, 无内容的元素可以使用一种特殊的形式: <名字/> . 这里, > 之前的正斜线实际上代替了结束标签. </td> </tr> <tr> <th class="d0"><a class="indexExample" href="../Output_chi/example6.html"> 实例 6 </a></th> <td class="d0"><a name="6"></a>元素名可以由字母, 数字, 连字符号, 下划线, 冒号或者是句号组成. 冒号用于一种特殊的场合, 即当其作为命名空间的划分时. 以xml, XML或者是其它同前面的字符串混合的元素名保留给标准, 因此不应该使用. </td> </tr> <tr> <th class="d1"><a class="indexExample" href="../Output_chi/example7.html"> 实例 7 </a></th> <td class="d1"><a name="7"></a>元素可以没有, 有一个或者有多个属性, 属性名的命名规则同元素命名规则相同. 其名字和值由 = 分隔, 并且属性值必须在单引号 '...' 或者双引号 "..." 之间, 如果要在属性值里面使用单引号或双引号, 那么就必须使用反斜线来进行转义. </td> </tr> <tr> <th class="d0"><a class="indexExample" href="../Output_chi/example8.html"> 实例 8 </a></th> <td class="d0"><a name="8"></a>字符 < 和 & 不能在文本内容中使用, 因为他们已经作为标记使用了. 如果你确实要用到这些字符, 那么应该用 &lt; 来代替 < 用 &amp; 代替 & </td> </tr> <tr> <th class="d1"><a class="indexExample" href="../Output_chi/example9.html"> 实例 9 </a></th> <td class="d1"><a name="9"></a>字符 >, " , 和 ' 也可以分别用 &gt; , &quot; 和 &apos; 来代替. </td> </tr> <tr> <th class="d0"><a class="indexExample" href="../Output_chi/example10.html"> 实例 10 </a></th> <td class="d0"><a name="10"></a>注释可以出现在文档的任何地方, 但必须位于其它标记之外. 一个XML处理器或许应该(但并非必须)能够让应用程序有办法得到注释的内容. 此外, 双连字符 "--" 不应该出现在注释里. </td> </tr> <tr> <th class="d1"><a class="indexExample" href="../Output_chi/example11.html"> 实例 11 </a></th> <td class="d1"><a name="11"></a>处理指令 (PIs) 允许文档包含针对应用程序的指令. </td> </tr> <tr> <th class="d0"><a class="indexExample" href="../Output_chi/example12.html"> 实例 12 </a></th> <td class="d0"><a name="12"></a>CDATA段可以用于编码包含有标记字符的文本块, CDATA段以字符串 " <![CDATA[" 和 "]]>" 作为开始和结束. 字符串 ']]>' 不能在CDATA段内出现. </td> </tr> <tr> <th class="d1"><a class="indexExample" href="../Output_chi/example13.html"> 实例 13 </a></th> <td class="d1"><a name="13"></a>XML文档或许应该以一个XML声明开始,该声明指定了要使用的XML的版本 </td> </tr> </table> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -