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

📄 4_refs.html

📁 XML_JAVA指南 书籍语言: 简体中文 书籍类型: 程序设计 授权方式: 免费软件 书籍大小: 377 KB
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<title>Substituting and Inserting Text</title>
<style type="text/css">
<!--
-->
</style></head>
<body BGCOLOR="#ffffff">
<table width="100%">
<tr>
    <td align=left> <a href="3_error.html"><img src="../images/PreviousArrow.gif" width=26 height=26 align=bottom border=0 alt="Previous | "></a><a
href="5a_dtd.html"><img src="../images/NextArrow.gif" width=26 height=26 align=bottom border=0 alt="Next | "></a><a href="../alphaIndex.html"><img src="../images/xml_IDX.gif" width=26 height=26 align=bottom border=0 alt="Index | "></a><a href="../TOC.html"><img
src="../images/xml_TOC.gif" width=26 height=26 align=bottom border=0 alt="TOC | "></a><a href="../index.html"><img
src="../images/xml_Top.gif" width=26 height=26 align=bottom border=0 alt="Top | "></a> 
    </td>
<td align=right><strong><em><a href="index.html">Top</a></em></strong> <a href="../TOC.html#intro"><strong><em>Contents</em></strong></a> <a href="../alphaIndex.html"><strong><em>Index</em></strong></a> <a href="../glossary.html"><strong><em>Glossary</em></strong></a>
</td>
</tr>
</table>
<p>
<center>
    <img src="../images/shoeline2.gif" align="BOTTOM" border="0" width="202"
    height="25" naturalsizeflag="3"><IMG SRC="../images/shoeline2.gif" ALIGN="BOTTOM" BORDER="0" WIDTH="202"
    HEIGHT="25" NATURALSIZEFLAG="3"> 
  </center>
  <blockquote> 
     <blockquote> 
        <hr size=4>
     </blockquote>
  </blockquote>
<h2>4. Substituting and Inserting Text</h2>
<table width="40%" border="1" align="right">
  <tr> 
    <td> 
      <div align="center"><b><i>Link Summary</i></b></div>
    </td>
  </tr>
  <tr> 
    <td> 
      <dl> 
        <dt><b><i>Exercise Links</i></b></dt>
      </dl>
      <ul>
        <li><a href="samples/slideSample03.xml">slideSample03.xml</a></li>
        <li><a href="work/Echo07-03.log">Echo07-03.log</a></li>
        <li><a href="samples/slideSample04.xml">slideSample04.xml</a></li>
        <li><a href="work/Echo07-04.log">Echo07-04.log</a></li>
      </ul>
      <p><b><i>API Links</i></b></p>
      <ul>
        <li><a href="../../api/internal/com/sun/xml/parser/LexicalEventListener.html">LexicalEventListener</a></li>
      </ul>
      <p><b><i>Glossary Terms</i></b></p>
      <dl> 
        <dd> <a href="../glossary.html#CDATA">CDATA</a>, <a href="../glossary.html#DTD">DTD</a>, 
          <a href="../glossary.html#entity">entity</a>, <a href="../glossary.html#entityReference">entity 
          reference</a></dd>
      </dl>
    </td>
  </tr>
</table>
<p>The next thing we want to with the parser is to customize it a bit, so you 
  can see how to get information it usually ignores. But before we can do that, 
  you're going to need to learn a few more important XML concepts. In this section, 
  you'll learn about: 
<ul>
  <li>Handling Special Characters (&quot;&lt;&quot;, &quot;&amp;&quot;, and so 
    on)</li>
  <p></p>
  <li>Handling Text with XML-style syntax</li>
</ul>
<h3><a name="chars"></a>Handling Special Characters</h3>
<p>In XML, an <a href="../glossary.html#entity">entity</a> is an XML structure 
  (or plain text) that has a name. Referencing the entity by name causes it to 
  be inserted into the document in place of the 
  <a href="../glossary.html#entityReference">entity reference</a>. To create an 
  entity reference, the entity name is surrounded by an ampersand and a semicolon, 
  like this: </p>
<blockquote> 
  <pre>&amp;entityName;</pre>
</blockquote>
Later, when you learn how to write a DTD, you'll see that you can define your 
own entities, so that <code>&amp;yourEntityName;</code> expands to all the text 
you defined for that entity. For now, though, we'll focus on the predefined entities 
and character references that don't require any special definitions. 
<h4><a name="predefined"></a>Predefined Entities</h4>
<p>An entity reference like <code>&amp;amp;</code> contains a name (in this case, 
  揳mp

⌨️ 快捷键说明

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