| View previous topic :: View next topic |
| Author |
Message |
Oleg Guest
|
Posted: Thu May 12, 2005 12:49 pm Post subject: JPEG to XML |
|
|
How to save jpeg in a XML-file with the help of component TXMLDocument?
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Thu May 12, 2005 2:11 pm Post subject: Re: JPEG to XML |
|
|
| Quote: | How to save jpeg in a XML-file with the help of component TXMLDocument?
Save in CDATA tag |
This type is for any binary data
--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com
|
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Sat May 14, 2005 5:37 pm Post subject: Re: JPEG to XML |
|
|
I'm not sure this is true, CDATA is intended for textual data. If the binary
data e.g. contains #0 things go wrong. Also, the binary data may
accidentally contain the ]]> (chance is length/256*256*256 but still rather
big).
It's much better to encode the binary data as BASE64 and then just add it to
a normal element.
Nils Haeck
(author of NativeXml)
www.simdesign.nl/xml.html
"Mike Shkolnik" <mshkolnik2002 (AT) ukr (DOT) net> schreef in bericht
news:428363d1$1 (AT) newsgroups (DOT) borland.com...
| Quote: | How to save jpeg in a XML-file with the help of component TXMLDocument?
Save in CDATA tag
This type is for any binary data
--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com
|
|
|
| Back to top |
|
 |
Jonas Gunnarsson Guest
|
Posted: Mon May 16, 2005 4:42 pm Post subject: Re: JPEG to XML |
|
|
Hi,
I recomend to use the "hexBinary" or "base64Binary" type to store
picturedata.
Do a search on <http://www.w3.org/> with "xml schema picture binary"
See: Example 2: Schema declaring an element with
binary content and expected media type of "image/jpeg" or
"image/png"
<http://www.w3.org/TR/xml-media-types/>
Best regards
/Jonas
Oleg skrev:
| Quote: | How to save jpeg in a XML-file with the help of component TXMLDocument?
|
|
|
| Back to top |
|
 |
|