[
Lists Home |
Date Index |
Thread Index
]
- From: "Mike Sharp" <msharp@lante.com>
- To: "'xml-dev@xml.org'" <xml-dev@xml.org>
- Date: Wed, 17 May 2000 19:05:28 -0700
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@usa.xerox.com> on 05/17/2000 04:58:19 PM
To: "'xml-dev@xml.org'" <xml-dev@xml.org>
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 "]]>". That, of course, adds processing time to both the client
and server in this communication.
2. If the sequence "]]>" 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@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************
|