Storing image in XML

自闭症网瘾萝莉.ら 提交于 2019-12-23 03:00:58

问题


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


回答1:


You could encode it using Base64 and store the result.




回答2:


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.

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.




回答3:


You could base64 encode it (xsd:base64binary).




回答4:


Of course there is a way. Although if you are talking about bitmaps (not vector-based images) it would make no sense at all.



来源:https://stackoverflow.com/questions/5232445/storing-image-in-xml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!