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的[编辑]>[选择性粘贴]菜单中.怎么玩?不急,咱们实际操作一下. 以网 ...
随机推荐
- Spring底层源码分析
Spring 运行原理 Spring 启动时读取应用程序提供的 Bean 配置信息,并在 Spring 容器中生成一份相应的Bean 配置注册表,然后根据这张注册表实例化 Bean,装配好 Bean ...
- CF372C Watching Fireworks is Fun(单调队列优化DP)
A festival will be held in a town's main street. There are n sections in the main street. The sectio ...
- Python入门(一个有趣的画图例子实战)你肯定不会
前言本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理.作者:qiu_fang 画一条可爱的python(蟒蛇): import t ...
- 【ES】338- ECMAScirpt 2019 新特性汇总
点击上方"前端自习课"关注,学习起来~ 最近在做的一个活动,大家都可以参与: 送 1600 元超大现金红包啦,走过路过不要错过哦 ~ 最近 ECMAScript2019,最新提案完 ...
- 【Web技术】314- 前端组件设计原则
点击上方"前端自习课"关注,学习起来~ 译者:@没有好名字了译文:https://github.com/lightningminers/article/issues/36,http ...
- Python 命令行之旅:使用 click 实现 git 命令
作者:HelloGitHub-Prodesire HelloGitHub 的<讲解开源项目>系列,项目地址:https://github.com/HelloGitHub-Team/Arti ...
- 【NodeJS】跨域
[NodeJS]跨域 转载:https://www.cnblogs.com/yangchongxing/p/10635480.html var express = require('express') ...
- 【搞定Jvm面试】 面试官:谈谈 JVM 类文件结构的认识
类文件结构 一 概述 在 Java 中,JVM 可以理解的代码就叫做字节码(即扩展名为 .class 的文件),它不面向任何特定的处理器,只面向虚拟机.Java 语言通过字节码的方式,在一定程度上解决 ...
- 《Java练习题》进阶练习题(二)
编程合集: https://www.cnblogs.com/jssj/p/12002760.html 前言:不仅仅要实现,更要提升性能,精益求精,用尽量少的时间复杂度和空间复杂度解决问题. [程序58 ...
- Elasticsearch 监控指标解析
1.集群监控 集群监控主要包括两个方面的内容,分别是集群健康情况和集群的运行状态. 集群健康状态可以通过以下api获取: http://ip:9200/_cluster/health?pretty 关 ...