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的[编辑]>[选择性粘贴]菜单中.怎么玩?不急,咱们实际操作一下. 以网 ...
随机推荐
- iOS FMDatabase 本地数据库的创建和几个基本使用方法
转自:http://blog.it985.com/3677.html 使用数据库之前当然要先在网上下载FMDB的库,然后添加到自己的工程里面去.没有的请点击下面的来下载 fmdb 在FrameWork ...
- 使用 Zookeeper 的 Api 实现服务注册
创建常量接口 com.bjsxt.constant.Constants package com.bjsxt.constant; public interface Constants { //访问Zoo ...
- 小程序使用wxs解决wxml保留2位小数问题
1.出现溢出表现 从图中可以看到数字超出了很长长度.代码里面是如下这样的.为什么在0.35出现?或者一些相成的计算出现? 而 0.34却不会.(wap.0834jl.com) 0.41 也会出现,好像 ...
- [TimLinux] Python 装饰器
1. 装饰器 一种语法格式,用于替换另外一个编码风格,一种语法糖,通过语法结构明确标识出这样一种语法. 自动在被装饰对象尾部执行代码(不使用装饰器语法时,需要明确写明的代码) 被装饰对象可以为函数.类 ...
- Openfiler存储搭建
说明: Openfiler是一个基于Linux的开源免费网络存储管理操作系统,通过WEB界面对存储磁盘进行管理,支持iSCSI.NFS 等网络存储协议. 目前最新版本:openfileresa-2.9 ...
- Zabbix 监控PHP-FTPM、Tomcat、Redis应用
一.zabbix 监控 PHP-FPM应用实战Nginx+PHP-FPM是目前最流行的LNMP架构,在基于PHP开发的系统下,对这些系统性能的监控,主要是关注PHP-FPM的运行状态,那么什么是PHP ...
- ARTS-S golang goroutines and channels(二)
向tcp服务端发消息 package main import ( "io" "log" "net" "os" ) fun ...
- unity3d 随机添加树木
开放世界随机地图才是最重要的.. 随机生成树木 Terrain.terrainData //获取地形设置 terrainData.treePrototypes {get;set;} //获取或设置树木 ...
- 【Web技术】295- 重新复习 Unicode 和 UTF-8
点击上方"前端自习课"关注,学习起来~ 引言 一直以来总是对 Unicode. UTF-8 等编码知识懵懵懂懂的,尤其是在做项目过程中只要涉及到几个编码之间的转换,都得到网上搜索一 ...
- 【Java Web开发学习】Spring4条件化的bean
[Java Web开发学习]Spring4条件化的bean 转载:https://www.cnblogs.com/yangchongxing/p/9071960.html Spring4引入了@Con ...