Does anyone know how to insert a picture in an XML document?

I have tried to insert the image using the following code, however I get an error message:

<html:img src="Festival.jpg" alt="" />

Thanks for your help


One Response to “Does anyone know how to insert a picture in an XML document?”

  • Rex S:

    xml does not support this type of code. Your code above is HTML code not XML. You need to encode the jpg file as a large string and then you can save it into the XML file. But then it would need to be reconstructed later as a .jpg image. This probably require an external mechanism, read programming environment, to accomplish. You would read the .jpg file and then base64 encode it, save it as a large element, then later read the XML file, read the element, decode from base64 and then display the image.

    HTH

Leave a Reply