XML-code for images
I've tried to seached the forum, I couldn't find similar threads, but I suppose it is. So please re-direct me to other threads.
Okey, here's my question, how can I find the XML to a picture? And, yes, I mean XML, not HEX, XSLT or anything else.
As said, that image is just an example, but let's use it, how can I find the XML for that image? I've tried using HEX Viewer, but that didn't help at all, I've tried open a Wordpad, save it as .xml, and put a image in, but that doesn't work either.
Did I explain dificult or do you understand?
Thanks in advance.
Images are made up of binary data... not sure exactly why you want to convert it to xml... you can store its address and dimensions into xml fields... sure...
Originally Posted by FourCourtJester
Well, it's for personal use. Can you teach me how too store the addresses and dimensions into XML fields?
well, a typical xml document will look similar to a simple html document. you will have tags, and within those tags will be options. The trick to xml, however, is tags and options can be anything you desire, not set in stone like html.
An example xml compilation for an image could be something like this:
More information can be found at http://www.w3schools.com/xml/default.asp
<src>the url to the image</src>
<height> image height in pixels</height>
<width> image width in pixels</width>
<title> whatever title you want for the image</title>
That's a bit advanced for me .. is their a possibility that you could "convert" some images into XML for me, possibly if you have a e-mail I contact you on?
That would mean much too me.
You'll want to Base64 encode the images. What sort of scripting do you have available?
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
I have Base64, but don't know how do use it with images.
You would read the binary data and encode the data in base64. The data would then be placed into an XML document, such as:
Originally Posted by The Bird
Of course, yours would most likely be considerably longer since that is for a 1x1 black GIF image. If all you're trying to do is store the image, then that's it; you're finished. If you actually want to display it in a browser, then you would use XSLT, mapping image/src in your XML document to img/@src in your transformation. That would essentially make the data useless unless you planned to use it for another purpose.
<description>A black dot. Size: 1px x 1px.</description>
for image and images downloading from website what are the tag or syntax used.
In XML Program for image and multiple images downloading from website
Which tag and syntax used
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)