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

Re: arbitrary bytes/characters?

  • From: "Mike Sharp" <msharp@l...>
  • To: "'xml-dev@x...'" <xml-dev@x...>
  • Date: Wed, 17 May 2000 19:05:28 -0700

bytes characters


I'm not sure I see where the problem is, assuming the bytestream does not
contain ]]>.  The parser will look for the ]]> that delimits the end of the
bytestream, and what was contained within the delimiters is the bytestream.  If
the bytestream is binary, I think I would encode it with Base64, and then decode
the parsed content for delivery to your application.  I don't see why you'd have
to escape the ]]>.

But perhaps one of the heavyweights will weigh in here and correct me!  ;^)

Regards,
Mike Sharp






"Cardona, Peter" <Peter.Cardona@u...> on 05/17/2000 04:58:19 PM

To:   "'xml-dev@x...'" <xml-dev@x...>
cc:    (bcc: Mike Sharp/Lante)

Subject:  arbitrary bytes/characters?




All-

(Sorry if this is a FAQ; I just subscribed to this list and the link to the
archives on xml.org is broken. I'm also very new to the XML stuff!)

I'm building a system that needs to deliver arbitrary byte streams and
descriptions of those streams to client software. Most of the conversations
between client and server use XML to encode requests and replies. My
approach was to embed the byte stream inside a CDATA section of an XML
document. But this appears to be impossible to do reliably:

1. The sequence "]]>" may not appear in byte stream, so I'd have to escape
it with "]]&gt;". That, of course, adds processing time to both the client
and server in this communication.

2. If the sequence "]]&gt;" were to appear in my byte stream as actual
content, then what? I don't see a way to escape the escape.

As I see it, to carry arbitrary bytes, a document must either specify how
many bytes/characters to consider as a byte stream, or the escape operation
needs its own escape (e.g. in C, '\' starts an escape sequence, '\\' means
plain backslash since those are allowed too).

Am I missing something or is XML just not able to do this?

-PC






***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

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.