📄 day1_4.html
字号:
</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>第四页:文档格式的排错</strong>
<p>我妈妈的清单中有数十条菜谱,甚至数百条。如果产生一个致<br>
命错误,排错将非常困难 - 你将一行一行地寻找丢失的标记<br>
符。如果使用几层嵌套,发现错误将很困难。</p>
<p>但是可以找到很好的帮助。分析器 - XML代码和报告格式错误<br>
的应用程序可以在网上免费得到。其中最好的是<a href="http://xml.com/xml/pub/tools/ruwf/check.html" target="_blank">Lark</a>,它的作<br>
者是由Tim Bray - XML规范的技术编辑和极力鼓吹者,地球上最<br>
聪明的人之一。</p>
<p>我用Lark分析下面的代码。注意"chocolate chips"和它的关闭<br>
标记符出现在<tt></ingredients></tt> 标记符中的位置有错误:</p>
<pre><?xml version="1.0"?>
<list>
<recipe>
<author>Carol Schmidt</author>
<recipe_name>Chocolate Chip Bars</recipe_name>
<meal>Dinner
<course>Dessert</course>
</meal>
<ingredients>
<item>2/3 C butter</item>
<item>2 C brown sugar</item>
<item>1 tsp vanilla</item>
<item>1 3/4 C unsifted all-purpose flour</item>
<item>1 1/2 tsp baking powder</item>
<item>1/2 tsp salt</item>
<item>3 eggs</item>
<item>1/2 C chopped nuts</item>
<item>
</ingredients>2 cups (12-oz pkg.) semi-sweet choc.
chips</item>
<directions>
Preheat overn to 350 degrees. Melt butter;
combine with brown sugar and vanilla in large mixing bowl.
Set aside to cool. Combine flour, baking powder, and salt; set aside.
Add eggs to cooled sugar mixture; beat well. Stir in reserved dry
ingredients, nuts, and chips.
Spread in greased 13-by-9-inch pan. Bake for 25 to 30 minutes
until golden brown; cool. Cut into squares.
</directions>
</recipe>
</list>
</pre>
<p>下面是分析器返回的结果:</p>
<pre>Error Report
Line 17, column 22: Encountered </ingredients> expected </item>
... assumed </item>
Line 18, column 36: Encountered </item> with no start-tag.
</pre>
<p>有了这种信息,找到错误将不会成为问题。那么XML文件的有效性<br>
是指什么呢?<a href="day2_1.html">>></a></p>
<p><strong>XML简介</strong><br>
<font color="#FF0000">第一页</font> <a href="day1_1.html">XML简介</a><br>
<font color="#FF0000">第二页</font> <a href="day1_2.html">以一份菜谱的例子开始</a><br>
<font color="#FF0000">第三页</font> <a href="day1_3.html">文档要组织良好</a><br>
<font color="#FF0000">第四页</font> 文档格式的排错</p>
<p>[第1天][<a href="day2_1.html">第2天</a>]</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. All rights reserved.
</span>
</center>
</body>
<!-- #EndTemplate --></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -