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的[编辑]>[选择性粘贴]菜单中.怎么玩?不急,咱们实际操作一下. 以网 ...
随机推荐
- 华为OSPF与ACL综合应用
一. 实验拓扑图 二.实验要求 1.企业内网运行OSPF路由协议,区域规划如图所示:2.财务和研发所在的区域不受其他区域链路不稳定性影响:3.AR1.AR2.AR3只允许被IT登录管理:4.YF和CW ...
- cenos基本信息和ssh
一.查看cenos相关信息 1.查看cpu more /proc/cpuinfo grep "model name" grep "model name ...
- idea结合maven小项目
整体构造 (修改 POM 文件 )parent <?xml version="1.0" encoding="UTF-8"?> <project ...
- HDU5919 Sequence II(主席树)
Mr. Frog has an integer sequence of length n, which can be denoted as a1,a2,⋯,ana1,a2,⋯,anThere are ...
- 2017 ACM/ICPC 沈阳 L题 Tree
Consider a un-rooted tree T which is not the biological significance of tree or plant, but a tree as ...
- 【JS】376- Axios 使用指南
点击上方"前端自习课"关注,学习起来~ 来源 | https://www.jianshu.com/p/df464b26ae58 一.axios 基于promise用于浏览器和 ...
- inline以及inline-block行内元素:vertical-align属性
- TOMCAT_server.xml
该文件描述了如何启动Tomcat Server <Server> <Listener /> <GlobaNamingResources> < ...
- 【Java SE】使用Javacv截取视频图片
[Java Web开发学习]使用Javacv截取视频图片 转载:https://www.cnblogs.com/yangchongxing/p/9482935.html github地址:https: ...
- 2020年值得你去试试的10个React开发工具
本文由葡萄城技术团队翻译并首发 转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具.解决方案和服务,赋能开发者. JavaScript每天都在出现大量的框架和工具,而React是除了上次我们 ...