473,383 Members | 1,874 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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 1734
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
ron widdison wrote:

[empty message]

http://xml.silmaril.ie/authors/graphics/

///Peter

Nov 23 '05 #11

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

Similar topics

4
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...
7
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....
3
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...
0
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...
2
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...
15
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....
8
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...
3
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...
38
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
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.