“/”的XML实体 [英] XML Entity for "/"?

查看:116
本文介绍了“/”的XML实体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在编写一些XML生成代码,并发现以下属性值正在修复XML格式:

So I'm writing some XML generating code, and found that the following attribute value was screwing up the XML formatting:

"Jim/Bob"

所以我研究了用作转义序列和每个列表的XML实体锯没有包括一个为正斜杠。我在这里遗漏了什么吗?似乎就像你想要逃避的那样...

So I looked into the XML Entities used as escape sequences and every list I saw did not include one for the forward slash. Am I missing something obvious here? Seems like the sort of thing you'd want to escape...

推荐答案

正斜杠是有效的,不是需要进一步的编码。

The forward slash is valid as is and does not need further encoding.

唯一的保留字符是:

>
<
&
%

对于更多的XML实体 - http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

For even more XML entities - http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

这篇关于“/”的XML实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆