Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. XML and Binary Data

XML and Binary Data

Scheduled Pinned Locked Moved XML / XSL
questioncomsysadminxmlhelp
3 Posts 3 Posters 11 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    There is following problem: Some application (remote COM server) produces dynamically some JPGs. these files are to be shown in browser of the remote client. The current way the things work is the following: The COM server writes the file to HDD , and returns url to the file back to client (with other data , enclosed in xml file). Client than reads the url and displays the image from remote location. The question is : Is it possible to embed the JPG file _inside_ XML file , and than is the client able to display the JPG directly from XML ? (or previously having saved it onto local drive ?) If so, what software (COMponents) to use ? I heard somewhere that in order to put binary data into XML file , these data must be BASE64 coded. What component to use for codeing/decoding (is this component shipped with windows 2000/XP ?) Thanx for answer Michal Januszczyk

    M K 2 Replies Last reply
    0
    • L Lost User

      There is following problem: Some application (remote COM server) produces dynamically some JPGs. these files are to be shown in browser of the remote client. The current way the things work is the following: The COM server writes the file to HDD , and returns url to the file back to client (with other data , enclosed in xml file). Client than reads the url and displays the image from remote location. The question is : Is it possible to embed the JPG file _inside_ XML file , and than is the client able to display the JPG directly from XML ? (or previously having saved it onto local drive ?) If so, what software (COMponents) to use ? I heard somewhere that in order to put binary data into XML file , these data must be BASE64 coded. What component to use for codeing/decoding (is this component shipped with windows 2000/XP ?) Thanx for answer Michal Januszczyk

      M Offline
      M Offline
      Michael A Barnhart
      wrote on last edited by
      #2

      First, yes you can embedded any data inside an XML data node. I have encoded binary data just as a server would encoded it to send it to a browser and then decoded it on the other side. Take a look at this page as an explanation. http://www.nacs.uci.edu/indiv/ehood/MIME/1521/05\_Content-Transfer-Encoding.html#5.2 To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli

      1 Reply Last reply
      0
      • L Lost User

        There is following problem: Some application (remote COM server) produces dynamically some JPGs. these files are to be shown in browser of the remote client. The current way the things work is the following: The COM server writes the file to HDD , and returns url to the file back to client (with other data , enclosed in xml file). Client than reads the url and displays the image from remote location. The question is : Is it possible to embed the JPG file _inside_ XML file , and than is the client able to display the JPG directly from XML ? (or previously having saved it onto local drive ?) If so, what software (COMponents) to use ? I heard somewhere that in order to put binary data into XML file , these data must be BASE64 coded. What component to use for codeing/decoding (is this component shipped with windows 2000/XP ?) Thanx for answer Michal Januszczyk

        K Offline
        K Offline
        kenlefeb
        wrote on last edited by
        #3

        In my current application, I am using SQLXML to access my data (including JPEG images) within SQL Server 2000. By using a mapping-schema to explicitly map the datatypes (from "image" to "base64binary"), the image is automatically encoded and decoded for me.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups