在XML文件中显示图像。 [英] Displaying Images in XML file.

查看:104
本文介绍了在XML文件中显示图像。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello all

我是XML和Web技术的新手。我想知道怎样才能在XML文件中显示图像。在这种情况下,约束是不要将

文件用作链接。相反,图像数据应该是

XML文件的一部分。这个文件将生成运行时。此文件将由某些应用程序创建,以便显示图像。


提前致谢。


Anand Sancheti

解决方案

AnandSancheti写道:

我是XML和Web的新手技术一般。我想知道如何在XML文件中显示图像。在这种情况下,约束是不将
文件用作链接。相反,图像数据应该是
XML文件的一部分




数据:url scheme和SVG让人想起。


-

David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>

首页是〜/ .bashrc的位置




AnandSancheti写道:

我是XML和Web技术的新手。我想知道如何在XML文件中显示图像。在这种情况下,约束是不将
文件用作链接。相反,图像数据应该是XML文件的一部分。这个文件将在运行时生成。




嗯有SVG(< http://www.w3.org/TR/SVG/) ,这是一个定义可缩放矢量图形的XML

应用程序。观看者是

Batik或Adobe SVG查看器。

最近浏览器也开始支持一些SVG,即将推出的Firefox

1.5将有本机SVG支持,Opera 8支持SVG Tiny,

Opera 9预览版已经改进了支持(特别是脚本编写)。

在这些浏览器中,您可以渲染混合命名空间文档元素

在XHTML命名空间中以及SVG命名空间中的元素。


你究竟在哪里显示你的XML目前?您是否使用了要显示的XHTML等XML

应用程序?或者你是否将
转换为HTML以显示它?


-


Martin Honnen
http://JavaScript.FAQTs.com/


我认为Anand想要将图像数据嵌入到XML文件中,而不是用XML创建图像。如果是这样的话,Anand,你应该用b $ b来编码图像数据,可能是在base64中,然后将它放入XML文件中,就像文本节点一样。然后,读取XML文本

的应用程序会将图像数据解码回其二进制形式并显示它或

将其传递给其他可以的应用程序。 />

-murat


Hello all
I am new to XML and Web technology in general. I want to know how can
we display an image in the XML file. In this case constraint is that no
file is to be used as a link. rather image data should be part of the
XML file. and this file would be generated runtime. this file would be
created by some application in order to display the images.

Thanks in advance.

Anand Sancheti

解决方案

AnandSancheti wrote:

I am new to XML and Web technology in general. I want to know how can
we display an image in the XML file. In this case constraint is that no
file is to be used as a link. rather image data should be part of the
XML file



The data: url scheme and SVG spring to mind.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is



AnandSancheti wrote:

I am new to XML and Web technology in general. I want to know how can
we display an image in the XML file. In this case constraint is that no
file is to be used as a link. rather image data should be part of the
XML file. and this file would be generated runtime.



Well there is SVG (<http://www.w3.org/TR/SVG/), which is an XML
application defining scalable vector graphics. Viewers for that are
Batik or the Adobe SVG viewer.
Recently browsers start supporting some SVG too, the upcoming Firefox
1.5 will have native SVG support, Opera 8 has support for SVG Tiny,
Opera 9 Preview has improved support (in particular for scripting).
In those browsers you can render mixed namespace documents with elements
in the XHTML namespace and with elements in the SVG namespace.

Where exactly do you "display" your XML currently? Do you use an XML
application like XHTML that is meant to be displayed? Or do you
transform your XML to HTML to display it?

--

Martin Honnen
http://JavaScript.FAQTs.com/


I think Anand wants to embed an image data into the XML file, rather
than creating an image in XML. If that''s the case, Anand, you should
encode the image data, probably in base64, and put it into the XML file
just like a text node. Then, the application that reads the XML text
would decode the image data back to its binary form and display it or
pass it to some other application that can.

-murat


这篇关于在XML文件中显示图像。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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