I’m confused

What will be the XML format for an image file / jpeg file?

tried my best to convert jpeg to xml but can't do.Please Help? I have tried watever I can but cant get the format converted to xml.
5 people have
this problem
+1
Reply
  • 1
    JPEG is binary data, and XML doesn't support characters in the range 0x00 - 0x1F; Therefore you have to convert the data to another format which XML *can* store.

    Base-64 conversion is the most common approach, often it's used for encoding data for email transmission.

    So, most scripting languages (PHP, .NET, Perl, Python etc) have the facility built in to convert a string of binary data to Base 64 encoded.

    You'll also have to Base-64 decode that data from the XML element when you need it, and send it to the client with the correct image/jpeg and size headers.

    Have you considered storing a reference to the image location on the filesystem (as you would when using a database), or are you just doing this as an exercise in pain ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited

  • I’m frustrated
    It's been a year. Hopefully you got an answer to this because I am having the same problem now. Made a custom header on an image program in JPG format (not knowing) my web host wants XSLT format. I've tried everything. I don't know what to do and I'm sorry, but I don't understand what the person who answered the question is saying. I'm quite new at this.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated happy, confident, thankful, excited