在 XML 中存储 base64 数据? [英] Storing base64 data in XML?
本文介绍了在 XML 中存储 base64 数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 XML 中存储 base64 字符串?
How I can store base64 strings in XML?
您是否使用 CDATA 在 XML 中存储 base64 字符串?是否有帮助,因为它允许使用 <> 在字符串中?
Do you use CDATA to store base64 strings in XML? Would it help as it allows use of < > within the strings?
base64 是否可配置,如果它们与 XML 冲突,您告诉它不要使用某些字符?
Is base64 configurable where you tell it not to use certain chars if they conflict with XML?
推荐答案
你可以将其存储为文本或属性值;不需要转义或 CDATA
部分.标准的 base 64 字符 +
和 /
(除了 az
、AZ
和 0-9
) 完全不干扰 XML 解析.
You can just store it as a text or attribute value; no escaping or CDATA
sections needed. The standard base 64 characters +
and /
(other than a-z
, A-Z
and 0-9
) do not interfere with XML parsing at all.
这篇关于在 XML 中存储 base64 数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文