以 XML 格式存储图像 [英] Storing image in XML

查看:24
本文介绍了以 XML 格式存储图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 XMl (XSD) 中存储图像数据?

Is there a way to store image data in XMl (XSD)?

推荐答案

我真的不建议这样做,但如果你真的需要你可以只用 Base64 编码你的图像并将它保存到 XML 文件并解码它您想在哪里使用它.

I really don't recommend to do this but if you really have to you can just encode your image in Base64 and save it to the XML File and decode it where you want to use it.

我在一些软件项目中看到过这种情况,但如果有办法避免这种情况,请不要这样做!这不是 XML 的用途.

I have seen this in some Software projects but if there is a way to avoid this please don't do it! That's not what XML is made for.

这篇关于以 XML 格式存储图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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