Re: [xml] exchanging xml over a network
- From: Michael Day <mikeday yeslogic com>
- To: Nicholas Andrews <tar bz2 gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] exchanging xml over a network
- Date: Thu, 8 Jun 2006 20:10:02 +1000 (EST)
In other words: count the characters, prepend the size in bytes to the
packet, and stream the whole thing? I suppose that does make sense,
but I'm a little concerned about the overhead.
Use HTTP as suggested elsewhere. Then you can either prepend the size
using the Content-length header like this:
Content-Type: application/xml
Content-Length: 419041
<root>
...
Or you can use chunked transfer encoding, in which no content length is
specified in advance and instead the content is written out in chunks, eg.
4096 bytes at a time with the length printed in ascii at the start of each
chunk (google for more details).
Anyway, HTTP is definitely the best choice for interoperability, so use it
if you possibly can.
Michael
--
Print XML with Prince!
http://www.princexml.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]