如何储存从xml检索视频 [英] how to store & retrive videos from xml

查看:120
本文介绍了如何储存从xml检索视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我需要从xml

hello,
i need to store & retrive the videos from xml

推荐答案

中存储和检索视频.您不能在xml中存储"任何内容,因为它不是持久性机制. >
但是,您可以将数据放入XML字符串/流中并提取它.

通常,用视频进行操作不是一个好主意,因为它可能会遗漏XML的全部内容.

但是,一种实现方法是.
1.以字节为单位捕获视频.
2.使用base64对字节进行编码.这将是一个字符串.
3.将字符串作为元素添加到XML文档中.

要提取它,可以逆转该过程.
You can''t "store" anything in xml since it isn''t a persistence mechanism.

You can however put data into a XML string/stream and extract it.

Normally doing that with a video isn''t a good idea because it probably misses the entire point of XML.

However one way to do it is.
1. Capture the video as bytes.
2. Encode the bytes using base64. This will be a string.
3. Add the string as an element in a XML doc.

To extract it reverse that process.


这篇关于如何储存从xml检索视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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