惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
A
About on SuperTechFans
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
MyScale Blog
MyScale Blog
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
月光博客
月光博客
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
T
Tailwind CSS Blog
Jina AI
Jina AI
有赞技术团队
有赞技术团队
博客园_首页

博客园 - stone

release 版本dll的调试 dead lock in thread pool Excel C# Automation 如何让iframe 自动适应窗口的高度 自定义Silverlight toolkit 里面的 Column Chart 的data point 二叉树算法题 How to do live debug the Managed code in Windows Phone 7 单链表操作相关算法 BUG: "Old format or invalid type library" error when automating Excel on 64 bit server 2008 - stone enable Assembly Load Trace 如何修改 VS 自动生成的 COM interop dll VS中Sos调试扩展简介 (转帖) Sql server 2005 connection string - stone Get depth of BTree Quick sort C# code(2) Quick sort C# code use the network trace, from msdn. - stone 字节流编码获取原来这么复杂,但也很简单 通过DataTable获得表的主键 让IE支持自己的协议
不合法的XML字符必须被替换为相应的实体 - stone - 博客园
stone · 2009-08-13 · via 博客园 - stone

转义字符
不合法的XML字符必须被替换为相应的实体。

如果在XML文档中使用类似"<" 的字符, 那么解析器将会出现错误,因为解析器会认为这是一个新元素的开始。所以不应该象下面那样书写代码:

<message>if salary < 1000 then</message>

为了避免出现这种情况,必须将字符"<" 转换成实体,象下面这样:

<message>if salary &lt; 1000 then</message>

下面是五个在XML文档中预定义好的实体:

&lt; < 小于号
&gt; > 大于号
&amp; & 和
&apos; ' 单引号
&quot; " 双引号

实体必须以符号"&"开头,以符号";"结尾。

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/High_Mount/archive/2008/09/19/2953335.aspx