Thread: Image Thru XML

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Posts
    4
    Rep Power
    0
    Hi Guys and Gals,
    IS it possible to Transfer the Image thru an XML format...if yes, how??? IF no, what's the alternative.

    I have found out a Solution thru MACROMEDIA FLASH5 thru its own proprietary GENERATOR componenet...although not a concrte one.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    81
    Rep Power
    14
    Remember XML is designed to be a platform neutral text format, so embedding binary data isn't something that it was really designed to do. That said if you want to embed an image into an XML document then you'll have to write some code to encode the image into some sort of binary-text format like base64 and then stuff that into a CDATA section.

    However, for most situations I'd suggest just creating a URL reference to the image in the XML.
    Robert Dominy
    About Guide for JavaScript
    http://javascript.about.com
    Software Consulting & Development
    http://www.angusog.com
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Posts
    4
    Rep Power
    0
    Can u send an Example to me...i am not too used to CDATA section.. if u can send me an Example i would be Greatful.....i'd be happy if u can mail me

    manju_rn@rediffmail.com
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    81
    Rep Power
    14
    No, but here are some resources where you can find examples and documentation.

    Web Links:

    http://www.w3schools.com/xml/

    http://www.15seconds.com/focus/XML.htm

    http://www.webdeveloper.com/xml/

    Books:
    http://www.amazon.com/exec/obidos/AS...rneceltichisto
    Robert Dominy
    About Guide for JavaScript
    http://javascript.about.com
    Software Consulting & Development
    http://www.angusog.com
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    81
    Rep Power
    14
    Here's another link that has articles specifically on handling binary data in XML:

    http://www.xml.com/pub/rg/Binary_Data
    Robert Dominy
    About Guide for JavaScript
    http://javascript.about.com
    Software Consulting & Development
    http://www.angusog.com
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Posts
    4
    Rep Power
    0
    Thnx Robert,
    ur suggestions and the links provided were indeed helpful....
    Actually we r researching on the Complete Shilft from Java Client to MacroMedia Flash 5. Flash 5 has all the Capabilities of thick client and can still be run as Thin Client inside a Browser. It can conect to all the Server side Programs such as Servlets, CGi or ASp. The Medium of Transfer is XML. So all the Data Including Images and Sound needs to be PAssed as an XML Data.

    Just thought u would be intersted.

    Cheers,
    Manja

IMN logo majestic logo threadwatch logo seochat tools logo