How to use special characters in XML?
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?的更多相关文章
- javascript: Convert special characters to HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- How to enter special characters like “&” in oracle database? [duplicate]
SQL> set define off; or use Try 'Java_22 '||'&'||' Oracle_14'
- reportNG定制化之失败截图及日志
先从github上拉下 reportNg的源代码 reportng 拉下源码后我们使用IDEA进行导入 1.reportng.properties 增加部分类表项 这里我们直接在末尾添加 log=L ...
- W3C XML Schema 教程
转自:http://www.blogjava.net/sham2k/articles/179825.html W3C XML Schema 教程 XML SCHEMA教程 本教程是笔者学习W3C的&l ...
- hive-site.xml 参数设置
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="confi ...
- DTD - XML Building Blocks
The main building blocks of both XML and HTML documents are elements. The Building Blocks of XML Doc ...
- 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 ...
- 使用Markup解析xml文件
1:怎么获取Markup.cpp 和 Markup.h 首先到http://www.firstobject.com/dn_markup.htm链接下,下载Release 11.5 zip (579k) ...
- 【VS技巧】根据XML自动生成类型
.NET 4.5对应的VS版本(不要问我哪个版本)中新增了一个功能,严重实用,可以根据XML文档生成新类型.这个功能在VS的[编辑]>[选择性粘贴]菜单中.怎么玩?不急,咱们实际操作一下. 以网 ...
随机推荐
- Cisco 7200 路由 PPPOE 拨号详解
1.1配置虚拟拨号接口 R1(config)#vpdn enable #启用vpdn虚拟专用拨号网络 R1(config)#interface dialer 1 ...
- 简单易懂的ftp脚本自动登录教程
我在上上篇<nmon脚本--对Linux服务器的监控>的脚本中,使用了ftp的自动登录.结果有人询问,遂决定专门写一篇简单易懂的博客,来说明如何解决ftp的自动登录问题. 一.Window ...
- ios instancetype与id区别
我们都知道未知类型的的对象可以用id关键字表示,那为什么还会再有一个instancetype呢? instancetype能返回相关联的类型(使那些非关联返回类型的方法返回所在类的类型):而id 返回 ...
- AutoLayout的那些事儿
转自:http://www.cocoachina.com/ios/20160530/16522.html 本文投稿文章,作者:MangoMade(简书) AutoLayout非常强大也非常易用,可读性 ...
- mac查看开关机记录-last命令
命令 last | grep reboot (查看开机时间记录) last | grep shutdown (查看关机时间记录) /var/log/messages日志中查询reboot(系统重启) ...
- 强化学习一:Introduction Of Reinforcement Learning
引言: 最近和实验室的老师做项目要用到强化学习的有关内容,就开始学习强化学习的相关内容了.也不想让自己学习的内容荒废掉,所以想在博客里面记载下来,方便后面复习,也方便和大家交流. 一.强化学习是什么? ...
- (全国多校重现赛一)F-Senior Pan
Senior Pan fails in his discrete math exam again. So he asks Master ZKC to give him graph theory pro ...
- Python脚本之三种运行方式,你会几个?
前言本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理.作者:Jeremy_Lee123 一.交互模式下执行 Python 这种模式 ...
- python3导入子模块
基础知识 参考资料1上有一句话Regular packages are traditional packages as they existed in Python 3.2 and earlier. ...
- Orleans 序列化遇到的坑
真的是巨坑 搞明白问题的我简直无法用言语来描述我的心情 先上架构图 理想中的架构 服务随便上 网关只负责分发 然后跟随官方教程写遇到了序列化问题 以前有经验,不慌,以前稀里糊涂就搞定了. 再然后遇到一 ...