Reputation: 4102
I have a image embedded in a XML file (no the path, the image bits).
<image>Image pixels encoded in 64<image>
then my question is if it is possible make a transformation XSL to HTML over the xml file and show the image embedded.
Thanks
Upvotes: 0
Views: 1252
Reputation: 167716
These days browsers have good support for data
URLs so you can use e.g.
<xsl:template match="image">
<img src="data:image/gif;base64,{.}"/>
</xsl:template>
if your XML image
element(s) contain GIF image data. You need to adapt the MIME type obviously if you have PNG or JPEG images for instance.
Upvotes: 1