[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: (char)0 handling proposal

  • From: Bjoern Hoehrmann <derhoermi@g...>
  • To: Brendan Macmillan <bren@m...>
  • Date: Fri, 17 Aug 2001 19:58:27 +0200

char 0
* Brendan Macmillan wrote:
>> >a convention for representing a character of value 0 in XML?
>> 
>> I suggest the hexBinary or base64Binary XML Schema Datatypes, they are
>> as "standard" as possible. Since the text node contains obviously binary
>> data, it's just the way to go.
>
>Thanks for your reply!  For pure binary data, I definitely agree.. but I'm
>thinking of strings like:
>
>"Now is the time for all good men to come to the aid of the party@@@@@@@@@"
>
>Where the "@" are null characters - where the String is *mostly* text, it
>would be nice to render the readable text as human readable...

Create a new simpleType quotedPrintable, then you can have

  "Now is the time for all good men to come to the aid of the
   party=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00"

where the string is converted to UTF-16LE before applying QP. This is as
human readble as possible. But please note that wouldn't be a very
interoperable solution and I discourage such multi-level encodings.

If it's binary don't use XML (directly) or use the mentioned types. Who
cares about human consumption _and_ uses binary data?
-- 
Björn Höhrmann { mailto:bjoern@h... } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.