But one can certainly argue the putting binary data in an XML string
is not a real possibility in the first place. Try loading an XML file
with a null byte in the middle in any XML parser and I would be very
surprised if it worked (although I haven't tested it to be sure).
Anyways, using a header with a defined size is also a good way and
doesn't have the same limitation. Just be sure not to use any
**Reader/**Writer classes if you want to support binary in XML (does
..NET's XML provider even support that ?!?).
Sam
------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
On Wed, 06 Dec 2006 17:32:44 +0100, 0xB055 <ma******@hotmail.com>
wrote:
>Samuel R. Neff wrote:
>When is it acceptable to put binary data inside a text format ?!?
If "binary" data needs to be in an XML file then it's usually base64
encoded.
Sam
i agree. actually there are two types xs:hexBinary and xs:base64Binary
which allow to embed binary data into an XML document. still, i wouldn't
chose a solution that puts a limitation on my possibilities if there is
an alternative that doesn't.
alain