⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 day2_2.html

📁 本本人最近搜集的xml学习文档,都是易学经典的文档,希望对大家有用!
💻 HTML
📖 第 1 页 / 共 2 页
字号:
    <td colspan="2">-<font color="#000000"><a href="../../1-download/page4.htm">电子商务</a></font> 
    </td>
  </tr>
  <tr> 
    <td colspan="2" align="center" bgcolor="#666699"><a href="../../1-teach/index.htm"><font color="#FFFFFF">实用技巧</font></a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/internet/index.htm">Internet应用</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/photoshop/index.html">Photoshop</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/flash/page1.html">Flash</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/asp/index.html">ASP</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/php/index.html">PHP</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/java/index.htm">Java</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/vb/index.htm">VB</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/c/index.htm">C、C++</a></td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-backend/database/php_mysql/index.html">PHP/MySQL</a></td>
  </tr>
  <tr> 
    <td colspan="2"><a href="../../1-backend/cgi_perl/perl_beginner/index.html">-Perl</a> 
    </td>
  </tr>
  <tr> 
    <td colspan="2">-<a href="../../1-teach/other/index.htm">其它</a> </td>
  </tr>
  <tr> 
    <td colspan="2" bgcolor="#666699"> 
      <div align="center"><font color="#FFFFFF">更多教程</font></div>
    </td>
  </tr>
  <tr> 
    <td colspan="2" height="17"><a href="../../1hdml/index.html">-HDML</a></td>
  </tr>
  <tr> 
    <td colspan="2" height="23"><font face="宋体"><a href="../../1-backend/database/course/day1_1.html">-网络数据库</a></font></td>
  </tr>
  <tr> 
    <td colspan="2" height="14"><a href="../../1-backend/protocols/ping/index.html"><font face="arial, helvetica, sans-serif">Ping</font></a></td>
  </tr>
  <tr> 
    <td colspan="2" height="20"><a href="../../1-backend/cgi_perl/search_engine/index.html">-创建搜索引擎</a></td>
  </tr>
  <tr> 
    <td colspan="2" height="16">-<a href="../../1adobe/GoLive/index.html">Adobe GoLive</a></td>
  </tr>
  <tr> 
    <td colspan="2"><a href="../../1-backend/cgi_perl/templates/index.html">模板</a></td>
  </tr>
  <tr> 
    <td colspan="2" align="center" bgcolor="#666699"><font color="#FFFFFF">合作伙伴</font></td>
  </tr>
  <tr> 
    <td colspan="2" align="left">-<a href="http://www.5dmedia.com/" target="_blank">5D精英网</a></td>
  </tr>
  <tr align="center"> 
    <td colspan="2"> <img src="../../Library/front_monkey.gif" width="59" height="68"></td>
  </tr>
  </tbody> 
</table>
<br><!-- #EndLibraryItem --></td>
      <!-- End of headlines (column 1: left column) --> <!-- Gutter between columns 1 and 2 --> 
      <td width="10" height="794"><img src="http://www.sohu.com/images/pixel.gif" width=10></td>
      <!-- Search box and directories (columns 2 and 3: middle columns, combined into one) --> 
      <td align=center valign=top width="558"> 
        <div align="left"><!-- #BeginEditable "1" --> 
              <table border="0" width="550" cellspacing="0">
                <tr> 
                  <td width="458" valign="top" align="left"><br>
                    <strong>第二页:DTD的完整例子</strong> 
                    <p>下面是一个完整的例子。我把另一个菜谱加入文件内,并为<br>
                      DTD做了注释。可以注意到我在第二个菜谱中用到子条目。</p>
                    <pre><small>&lt;?xml version=&quot;1.0&quot;?&gt;</small></pre>
                    <pre><small>    &lt;!--This starts the DTD. The first four lines address document structure--&gt;</small></pre>
                    <pre><small>    &lt;!DOCTYPE list [ </small></pre>
                    <pre><small>    &lt;!ELEMENT recipe (recipe_name, author, meal, ingredients,directions)&gt; </small></pre>
                    <pre><small>    &lt;!ELEMENT ingredients (item+)&gt; </small></pre>
                    <pre><small>    &lt;!ELEMENT meal (#PCDATA, course?)&gt; </small></pre>
                    <pre><small>    &lt;!ELEMENT item (#PCDATA, sub_item*)&gt; </small></pre>
                    <pre><small>    &lt;!--These are the remaining elements of the recipe tag --&gt; </small></pre>
                    <pre><small>    &lt;!ELEMENT recipe_name (#PCDATA)&gt; </small></pre>
                    <pre><small>    &lt;!ELEMENT author (#PCDATA)&gt; </small></pre>
                    <pre><small>    &lt;!ELEMENT directions (#PCDATA)&gt; </small></pre>
                    <pre><small>    &lt;!--The remaining element of the meal tag --&gt; </small></pre>
                    <pre><small>    &lt;!ELEMENT course (#PCDATA)&gt; </small></pre>
                    <pre><small>    &lt;!--The remaining element of the item tag --&gt; </small></pre>
                    <pre><small>    &lt;!ELEMENT sub_item (#PCDATA)&gt;</small></pre>
                    <pre><small>]&gt;</small></pre>
                    <p> </p>
                    <pre><small>&lt;?xml version=&quot;1.0&quot;?&gt; </small></pre>
                    <pre><small>   &lt;list&gt; </small></pre>
                    <pre><small>	&lt;recipe&gt; </small></pre>
                    <pre><small>	&lt;author&gt;Carol Schmidt&lt;/author&gt; </small></pre>
                    <pre><small>	&lt;recipe_name&gt;Chocolate Chip Bars&lt;/recipe_name&gt; </small></pre>
                    <pre><small>	&lt;meal&gt;Dinner </small></pre>
                    <pre><small>	    &lt;course&gt;Dessert&lt;/course&gt; </small></pre>
                    <pre><small>	&lt;/meal&gt;</small></pre>
                    <pre><small>	&lt;ingredients&gt; </small></pre>
                    <pre><small>		&lt;item&gt;2/3 C butter&lt;/item&gt; </small></pre>
                    <pre><small>		&lt;item&gt;2 C brown sugar&lt;/item&gt; </small></pre>
                    <pre><small>		&lt;item&gt;1 tsp vanilla&lt;/item&gt; </small></pre>
                    <pre><small>		&lt;item&gt;1 3/4 C unsifted all-purpose flour&lt;/item&gt; </small></pre>
                    <pre><small>		&lt;item&gt;1 1/2 tsp baking powder&lt;/item&gt; </small></pre>
                    <pre><small>		&lt;item&gt;1/2 tsp salt&lt;/item&gt; </small></pre>
                    <pre><small>		&lt;item&gt;3 eggs&lt;/item&gt; </small></pre>
                    <pre><small>		&lt;item&gt;1/2 C chopped nuts&lt;/item&gt; </small></pre>
                    <pre><small>		&lt;item&gt;2 cups (12-oz pkg.) semi-sweetchoc. chips&lt;/item&gt; </small></pre>
                    <pre><small>	&lt;/ingredients&gt; </small></pre>
                    <pre><small>	&lt;directions&gt;</small></pre>
                    <pre><small>	    Preheat oven to 350 degrees. Melt butter; </small></pre>
                    <pre><small>	    combinewith brown sugar and vanilla in large mixing bowl.</small></pre>
                    <pre><small>	    Set aside to cool. Combine flour, baking powder, andsalt; </small></pre>
                    <pre><small>	    set aside.Add eggs to cooled sugar mixture; beat well. </small></pre>
                    <pre><small>	    Stir in reserved dry ingredients, nuts, and chips.</small></pre>
                    <pre><small>	    Spread in greased 13-by-9-inch pan. </small></pre>
                    <pre><small>	    Bake for 25 to 30minutes until golden brown; cool. </small></pre>
                    <pre><small>	    Cut into squares. </small></pre>
                    <pre><small>	&lt;/directions&gt; </small></pre>
                    <pre><small>    &lt;/recipe&gt; </small></pre>
                    <pre><small>    &lt;recipe&gt; </small></pre>
                    <pre><small>	&lt;recipe_name&gt;Pasta with tomato Sauce&lt;/recipe_name&gt; </small></pre>
                    <pre><small>	&lt;meal&gt;Dinner </small></pre>
                    <pre><small>	    &lt;course&gt;Entree&lt;/course&gt; </small></pre>
                    <pre><small>	&lt;/meal&gt; </small></pre>
                    <pre><small>	&lt;ingredients&gt; </small></pre>
                    <pre><small>	    &lt;item&gt;1 lb spaghetti&lt;/item&gt; </small></pre>
                    <pre><small>	    &lt;item&gt;1 16-oz can diced tomatoes&lt;/item&gt; </small></pre>
                    <pre><small>	    &lt;item&gt;4 cloves garlic&lt;/item&gt; </small></pre>
                    <pre><small>	    &lt;item&gt;1 diced onion&lt;/item&gt; </small></pre>
                    <pre><small>	    &lt;item&gt;Italian seasoning </small></pre>
                    <pre><small>		&lt;sub_item&gt;oregano&lt;/sub_item&gt; </small></pre>
                    <pre><small>		&lt;sub_item&gt;basil&lt;/sub_item&gt; </small></pre>
                    <pre><small>		&lt;sub_item&gt;crushed red pepper&lt;/sub_item&gt;</small></pre>
                    <pre><small>	    &lt;/item&gt; </small></pre>
                    <pre><small>	&lt;/ingredients&gt; </small></pre>
                    <pre><small>	&lt;directions&gt;</small></pre>
                    <pre><small>	    Boil pasta. Saut&eacute; garlic and onion. </small></pre>
                    <pre><small>	    Add tomatoes.Serve hot. </small></pre>
                    <pre><small>	&lt;/directions&gt; </small></pre>
                    <pre><small>    &lt;/recipe&gt;</small></pre>
                    <pre><small>&lt;/list&gt;</small></pre>
                    <p>既然有DTD,文档将被检查看是否符合DTD做出的限制。换句话<br>
                      说,我们要保证文档的有效性。</p>
                    <p>为了达到这个目的,我们需要另一个工具:有效性分析器。微软<br>
                      的<a href="http://www.microsoft.com/xml/parser/jparser.asp" target="_blank">MSXML</a>,一个基于Java的程序,使用容易又工作得很好。上面的<br>
                      文档经过这个程序的检查后没有发现错误。但是如果我检查一个<br>
                      ingredient标记符中没有包含条目的菜谱,将会返回以下信息:</p>
                    <tt> 
                    <p><small>ingredients is not complete. Expected elements [item].</small></p>
                    </tt> 
                    <p><a href="day2_3.html">&gt;&gt;</a></p>
                    <p><strong>XML简介</strong><br>
                      <font color="#FF0000">第一页</font> <a href="day2_1.html">实现有效性</a><br>
                      <font color="#FF0000">第二页</font> DTD的完整例子<br>
                      <font color="#FF0000">第三页</font> <a href="day2_3.html">XML的未来</a></p>
                    <p>[<a href="day1_1.html">第1天</a>][第2天]</p>
                    <hr align="left" width="95%">
                    <!--webbot bot="Include" U-Include="../../copyright.html" TAG="BODY" startspan --> 
                    <p><font color="#000000"><span class="smallfont"><span class="smallfont">本栏目内容归<a href="http://www.hotwired.com">Wired 
                      Digital Inc.</a>所有,任何单位或个人未经许可,不得擅自转载使用。 <a href="http://www.sohu.com">搜狐</a>公司制作完成。</span></span></font></p>
                    <!--webbot bot="Include" endspan i-checksum="15926" --> </td>
                </tr>
              </table>
              <!-- #EndEditable --></div>
      </td>
      <!-- End of search box and directories (columns 2 and 3: middle columns, combined into one) --> 
      <!-- Gutter between columns 3 and 4 --> <!-- Other stuff (column 4: right column) --> 
      <!-- End of other stuff (column 4: right column) --> </tr>
  </table>
<!-- End of table surrounding page contents -->

  <hr noshade size=1 width=700>
 <span class=eng><br>
  Copyright (C) 1998-2000 Internet Technologies China.&nbsp; All rights reserved. 
  </span> 
</center>
</body>
<!-- #EndTemplate --></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -