Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-01-2005, 11:33 PM   #1 (permalink)
In The Zone
 
sms_solver's Avatar
 
Join Date: Jan 2004
Location: somewhere
Posts: 420
Default Can XML hold binary data?


Can XML hold binary data?

Can someone tell whether a XML file can hold binary data. I mean to say can XML element hold binary data for eg a content of gif/jpeg file, so that it can be later extracted from another application

Thankx in adv for the answer
__________________
[ॐ एसएमएस॰सोल्भर ॐ]
sms_solver is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 04-01-2005, 01:17 AM   #2 (permalink)
Coming back to life ..
 
it_waaznt_me's Avatar
 
Join Date: Nov 2003
Location: A bit closer to heaven
Posts: 1,997
Default

Hmm.. I guess I didnt understood it .. XML are text files .. They cant hold binary data .. but the rows or column of the database can hold that binary data alright .. that means that GIF or JPEG should be saved as it is and a link to it in the XML ..

Btw .. You should read this page ..

http://www.topxml.com/xml/learnxml.asp
__________________
Sleight of hand and twist of fate...
On a bed of nails she makes me wait...
And I wait without you ...
With or without you ..
----
Batty = Too Busy Now !!!
it_waaznt_me is offline  
Old 04-01-2005, 01:08 PM   #3 (permalink)
FooBar Guy
 
GNUrag's Avatar
 
Join Date: Jun 2004
Location: GNUmbai
Posts: 1,245
Default

Of course it can hold. XML is designed to be a portable storage which can hold any kind of data.

In this case you may want to use Base64 encoding scheme , even UUEncode is good enough. The only thing is that data will take one third of more space to hold. XML can be used to hold complete movies of DVDs... just that the program parsing XML file should be able to scale to that sizes...

Python comes with a rich library for handeling MIME data, which allows one to convery binary into Base64 in just a few lines of code.
__________________
- --
http://web.gnuer.org
GNUrag is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by clinton
- by Krow
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 11:43 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2