https://dvteclipse.com/documentation/svlinter/How_to_use_special_characters_in_XML.3F.html

Because XML syntax uses some characters for tags and attributes it is not possible to directly use those characters inside XML tags or attribute values.

To include special characters inside XML files you must use the numeric character reference instead of that character. The numeric character reference must be UTF-8 because the supported encoding for XML files is defined in the prolog as encoding="UTF-8" and should not be changed.

The numeric character reference uses the format:

&#nn; decimal form

&#xhh; hexadecimal form

Code Name Displayed as
Horizontal tab non-printing
Line feed non-printing
Carriage Return non-printing
Space non-printing
! Exclamation mark !
" Quotation mark "
# Number sign #
$ Dollar sign $
% Percent sign %
& Ampersand &
' Apostrophe '
( Left parenthesis (
) Right parenthesis )
* Asterisk *
+ Plus sign +
, Comma ,
- Hyphen -
. Period .
/ Slash /
: Colon :
; Semi-colon ;
< Less than <
= Equals sign =
> Greater than >
? Question mark ?
@ At @
[ Left square bracket [
\ Bbackslash \
] Right square bracket ]
^ Caret ^
_ Underscore _
` Acute accent `
{ Left curly brace {
| Vertical bar |
} Right curly brace }
~ Tilde ~

How to use special characters in XML?的更多相关文章

  1. javascript: Convert special characters to HTML

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. How to enter special characters like “&” in oracle database? [duplicate]

    SQL> set define off; or use Try 'Java_22 '||'&'||' Oracle_14'

  3. reportNG定制化之失败截图及日志

    先从github上拉下 reportNg的源代码 reportng  拉下源码后我们使用IDEA进行导入 1.reportng.properties 增加部分类表项 这里我们直接在末尾添加 log=L ...

  4. W3C XML Schema 教程

    转自:http://www.blogjava.net/sham2k/articles/179825.html W3C XML Schema 教程 XML SCHEMA教程 本教程是笔者学习W3C的&l ...

  5. hive-site.xml 参数设置

    <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="confi ...

  6. DTD - XML Building Blocks

    The main building blocks of both XML and HTML documents are elements. The Building Blocks of XML Doc ...

  7. List of XML and HTML character entity references

    A character entity reference refers to the content of a named entity. An entity declaration is creat ...

  8. 使用Markup解析xml文件

    1:怎么获取Markup.cpp 和 Markup.h 首先到http://www.firstobject.com/dn_markup.htm链接下,下载Release 11.5 zip (579k) ...

  9. 【VS技巧】根据XML自动生成类型

    .NET 4.5对应的VS版本(不要问我哪个版本)中新增了一个功能,严重实用,可以根据XML文档生成新类型.这个功能在VS的[编辑]>[选择性粘贴]菜单中.怎么玩?不急,咱们实际操作一下. 以网 ...

随机推荐

  1. 利用etcd实现服务注册和服务发现

    文章目录 服务注册 服务发现 协议编写 服务端实现 客户端实现 实验结果 参考文章 服务注册 主要逻辑在go func函数里面,先是去etcd获取一下服务,没有获取到的话就注册进去. package ...

  2. cesium 结合 geoserver 实现地图属性查询(附源码下载)

    前言 cesium 官网的api文档介绍地址cesium官网api,里面详细的介绍 cesium 各个类的介绍,还有就是在线例子:cesium 官网在线例子,这个也是学习 cesium 的好素材. 内 ...

  3. LightOJ 1229 Tablecross

    Treblecross is a two player game where the goal is to get three X in a row on a one-dimensional boar ...

  4. UVA-11987

    I hope you know the beautiful Union-Find structure. In this problem, you're to implement somethingsi ...

  5. 【CSS】271- RGB、HSL、Hex网页色彩,看完这篇全懂了

    作者:CSS可乐 http://csscoke.com/2015/01/01/rgb-hsl-hex/ 网页使用到的色彩标示方法中,从古早时期大家都在用的16进位码(#000000).RGB色值标示. ...

  6. httpBasic 认证的URL访问

    httpBasic 认证 要在发送请求的时候添加HTTP Basic Authentication认证信息到请求中,有两种方法: 1.在请求头中添加Authorization: Authorizati ...

  7. irules

    BIG-IP系统iRules基本概念_v11.6.1 2017年10月10日 00:35:16 ifelif 阅读数:1097   1 iRules介绍 什么是iRule iRule是BIG-IP本地 ...

  8. Java修饰符public,protected,default,private访问权限

    public 具有最大的访问权限.所有类可访问. protected 主要是用来保护子类.自身.子类及同一个包中类可以访问 default 没有加修饰符的.有时候也称为friendly,它是针对本包访 ...

  9. Linux内核构建过程

    构建内核 # shell 执行如下指令make zImage 全局变量 srctree    := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))objtree ...

  10. java8新特性- 默认方法 在接口中有具体的实现

    案例分析 在java8中在对list循环的时候,我们可以使用forEach这个方法对list进行遍历,具体代码如下demo所示 public static void main(String[] arg ...