473,796 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying Images in XML file.

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

Oct 30 '05 #1
10 1782
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
Oct 30 '05 #2

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/
Oct 30 '05 #3
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

Oct 30 '05 #4
Hello all
thanks A lot for your replies suggestions and guidence. I guess I have
not made myself clear and will again describe the situation.
Given an Image I want to display it such that it would not be the
filename of the image in the XML rather "Pixel data in the XML". Is
this possible in XML. As martine asked wheather it would be XHTML or
HTML. I would be transforming XML to HTML.

I hope this makes me clear
Once again thanks for your valuable comments.

Best Regards
Anand Sancheti

Oct 31 '05 #5


AnandSancheti wrote:

Given an Image I want to display it such that it would not be the
filename of the image in the XML rather "Pixel data in the XML". Is
this possible in XML. As martine asked wheather it would be XHTML or
HTML. I would be transforming XML to HTML.


So in the end you have HTML to be rendered in a browser and want to have
an image rendered in an HTML document where the data is provided inline
and not by a URL to an image file.
That David's suggestion about the data: URL is a solution, at least in
theory, as IE/Win for instance does not support data: URLs so far I think.
data: URLs are specified here:
<http://www.faqs.org/rfcs/rfc2397.html>

Netscape 4 supports them, Mozilla does, Opera 8, but as said IE/Win not.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 31 '05 #6
AnandSancheti wrote:
Hello all
thanks A lot for your replies suggestions and guidence. I guess I have
not made myself clear and will again describe the situation.
Given an Image I want to display it such that it would not be the
filename of the image in the XML rather "Pixel data in the XML". Is
this possible in XML.


Not directly. See the FAQ at http://xml.silmaril.ie/authors/graphics/

As others have already explained, the only ways of storing image data
in an XML document instance are by encoding it, by using SVG, or with
the data: scheme. XML is a text document format, not a graphics format.

///Peter

Oct 31 '05 #7
Hi Peter
I could not get your reply
What do you mean when you say after Encoding it?
I have some Image which has got some specific header + JPEG image data.
I will read JPEG part in the memory. Now I want to display the same in
to a XML/HTML page with the restriction that we cannot create a
temorary file. (with temorary file it would have been easier as we can
use the link inside XML)

With this how can I go ahead?

Thanks
Regards
Anand Sancheti

Nov 1 '05 #8
AnandSancheti wrote:
I could not get your reply
It's at <3s************ @individual.net >
What do you mean when you say after Encoding it?
I suspect he meant converting it to a form that can be represented by 7-bit
ACSII.
I have some Image which has got some specific header + JPEG image data.
I will read JPEG part in the memory. Now I want to display the same in
to a XML/HTML page with the restriction that we cannot create a
temorary file. With this how can I go ahead?


As mentioned previously - using the data: url scheme is probably the best
solution (with the widest level of support, although that doesn't extend to
Microsoft Internet Explorer)

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Nov 1 '05 #9


*** Sent via Developersdex http://www.developersdex.com ***
Nov 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7337
by: Gregory | last post by:
Hello, I've managed to build two web pages, one that can display images with associated text data in a table, and one that can resize and display images without the text. I'd like to resize the images as I go, without writing them to disk on the server. Do I need to prepare all of the resized images before I display the data from the select (which is put into an array by php). How can I display a resized image in a table, without writing...
7
2346
by: Vinay | last post by:
Hi All: I have a small application that stores images either in the database or as files (depending on the user preference). I'm in the process of providing a web interface to this application. 1. If the images are stored in the DB then, every an image is requested, it will need to be pulled out and a temp file created and then displayed? What is the best way to do this?
3
3485
by: Dalan | last post by:
At first I was not certain what could cause Access 97 from displaying most jpeg images, but not all. After further testing, it seemed that all original images of less than 275 pixels per inch or less would display, but those close to 300 pixels/inch or greater would not (MS Access cannot recognize the file format xxx.jpg). The larger, original images were scanned and saved as .bmp (at 300 dpi producing a 15MB file). Then the images were...
0
1728
by: Fronky | last post by:
Hope someone can help. I am still learning, so no laughing please. I am displaying records from a database using Response.Write(""); instead of the usual datagrid method. I am doing it this way to achieve the result I require. However. Since I have added a button to the screen, and have had to include the "object sender, System.EventArgs e", the Response.Write code has been appearing within the Documents_Table(null,null); tag on the...
2
3474
by: johnb41 | last post by:
In my app, I need to open up a multipage tiff file, and also display it's thumbnail images IN HIGH QUALITY. (High Quality meaning anti-aliased, and looking good; not rough and pixely) The thumbnail images are displayed in a ListView control. (I go through each page of the file, create a thumbnail of it, and put it into an ImageList. Then i hook that imagelist up to the ListView.) It works fine, but it is VERY slow. Creating and...
15
22316
by: Jameson | last post by:
Happy New Year, Everyone! I am trying to figure out how to display a bunch of images (mainly JPEGs, but possibly a few GIFs and PNGs as well) that are stored in a local directory on the system. I can do this with the glob() function, but I can't seem to put in a directory other than one within the webroot. For example, I can only put "/uploads" and not "/Volumes/jray/Pictures...". Any ideas how to get around this? If I can't use the...
8
3304
by: Jon Weston | last post by:
I'm setting up an Access2003 database with pictures. I put a bound ole picture ctrl on a form that's source is the table that contains the pictures and follow ALL the directions for embedding a picture. The ctrl in the form only displays the filename of the picture. The underlying table, when opened in table view, shows the word "package" in the field. When I double-click on either it opens the picture, but I can't get it to display. ...
3
5828
by: CD | last post by:
An application is logging faxes sent in SQL2000 image column type. I have found code on the net but what it is doing is prompting to save to local which is fine for single page image. Not good for multiple page faxes. I have not been able to locate an example to load in the browser or how to handle multiple image in the one column. 1) Ideally it would be nice to display back in the browser since some may be multiple images. I am not...
38
5079
by: ted | last post by:
I have an old link that was widely distributed. I would now like to put a link on that old page that will go to a new page without displaying anything.
14
2119
by: ashraf02 | last post by:
i used a code from a website that allows you to display images. however everything works fine from storing the image to the database but it does not display the image. the following code is the one i have used. Storing the images: <HTML> <HEAD><TITLE>Store binary data into SQL Database</TITLE></HEAD> <BODY>
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10237
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7553
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6795
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5446
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5578
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.