At 12:53 -0400 10/21/03, Dan Sugalski wrote:
> Yeah, if you're just needing to tag the stream with a label to indicate
the type plus a version number, then xml's on the one hand overkill and
 > on the other hand not necessarily a big help to xml proponents.
So, in a nutshell, throwing an XML format type tag at the beginning buys
us nothing regardless of whether it's an XML stream or not?

Yep. But mainly I think because you'll need to encode binary data to make it valid XML. That's on overhead you don't to suffer for those serialization that don't need it.


If you ask me, you could do easy with a simple header line like:

  parrot xml 1.0
  \0

basically magic word ('parrot')
 followed by a space
 followed by the type
 followed by a space
 followed by version
 followed by a CRLF (not sure about this one, but could be nice)
 followed by a null byte

I'm not clear if you would know beforehand how many bytes of data you would receive. If that is possible to know at all time, then I would suggest having the length as an extra part of the header.


In that case, nuts to that. It's already terribly obvious I'm going to
mess it up if I try, so we'll just skip it and move on to the next
headache. :)

Which means I'll be going back to lurking mode again... ;-)



Liz

Reply via email to