Take the tour ×  I would like to insert an images within an
element the XML file, what is the best way to do this? Would you
please suggest some good way to include an images to xml file?
share|improve this question add comment  5 Answers  The most
common way of doing this is to include the binary as base-64 in
an element. However, this is a workaround, and adds a bit of
volume to the file.  For example, this is the bytes 00 to 09
(note we needed 16 bytes to encode 10 bytes worth of data):
how you do this encoding varies per architecture. For example,
with .NET you might use Convert.ToBase64String, or
XmlWriter.WriteBase64.  share|improve this answer add comment
XML is not a format for storing images, neither binary data. I
think it all depends on how you want to use those images. If you
are in a web application and would want to read them from there
and display them, I would store the URLs. If you need to send
them to another web endpoint, I would serialize them, rather
than persisting manually in XML. P