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

Re: CDATA vs. Escaped characters


escaped characters

----- Original Message -----
From: "Mike Brown" <mike@s...>
To: <xml-dev@l...>
Cc: <NBEYER@c...>
Sent: Wednesday, March 20, 2002 7:58 PM
Subject: Re:  CDATA vs. Escaped characters


> 4. Simple byte counts might be an issue. Using a CDATA section can cut
down
> the space required to store or transmit those portions of a document that
> would otherwise be riddled with numerous escaped characters. On the other
> hand, many small, unnecessary CDATA sections can add unnecessary bulk to
the
> size of the document.
>
>    - Mike

There is also a good ol' technology that would work as an alternative here
if the content would be riddled with a large percentage of escaped
characters: BASE64 encoding.  Yes, the content would inflate by 33% (4 bytes
to store 3 characters).  No, your parser wouldn't decode for you
automatically (unless you wrote the parser).  However, this can be
considerably less (byte counts) than inflation from escaped characters.
Also, processing might be a bit easier here, since only one DOM node or SAX
event would occur for the encoded content, and the block can be quickly
decoded.  Of course, it becomes necessary to denote in the XML whether the
content is or is not encoded, or to have it understood that the content is
always to be encoded.  As with any handling of character data in XML, there
are trade-offs...

My suggestion is to add <![BASE64[ ]]> to XML. :)

---
Seairth Jacobs
seairth@s...


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.