By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 664 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Compress XML.

P: n/a
How can I compress XML data trought php SoapClient function and soap-
server?

Oct 8 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
The usual way to compress XML is just to put it through a standard
text-compression tool such as zip/gzip. That compresses both structure
and content very effectively. But that produces binary data, which would
have to be encoded (eg base-64 encoding) before it could be wrappered in
XML, and that encoding of course adds some space overhead back in.

I don't know of any other standard way of compressing a SOAP payload.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Oct 8 '07 #2

P: n/a
Actually, a better answer would be to embed the XML within the SOAP
envelope, compress the whole thing, send the binary, and decompress it
before trying to interpret the message as SOAP. But I don't know whether
any of the common SOAP tools would support that.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Oct 8 '07 #3

P: n/a
Cydrome Leader wrote:
Is there anything that isn't lame about xml?
Lots. If you're interested, websearch.

XML syntax is not intended to be terse. It's intended to be an
easily-toolable, easily-debuggable interchange format -- and has
succeeded well enough to kill off several binary interchange formats,
because in fact terseness is overrated for that set of tasks. XML has
served as a coalescence point for a whole bunch of useful technology
which was previously trapped in its own little non-interchangable corners.

If you're looking for a back-end data format, XML syntax isn't it...
though depending on your needs, the XML data model may be. See, for
example, the pureXML features in IBM's DB2 database product, which
directly express the XML Infoset -- that isn't just because XML is
trendy, it's because XML is *USEFUL* as a set of concepts.

XML is a tool. Not all tools suit all tasks. If it isn't the right tool
for your purposes, that's fine; some applications really do run in a
vaccuum and talk only to themselves, and for those XML is probably not
the right answer... unless they want the convenience of being able to
leverage other apps and existing libraries rather than reinventing some
of these wheels.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Oct 24 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.