Compress XML.

Discussion in 'XML' started by thespamer, Oct 8, 2007.

  1. thespamer

    thespamer Guest

    How can I compress XML data trought php SoapClient function and soap-
    server?
     
    thespamer, Oct 8, 2007
    #1
    1. Advertising

  2. 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
     
    Joseph Kesselman, Oct 8, 2007
    #2
    1. Advertising

  3. 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
     
    Joseph Kesselman, Oct 8, 2007
    #3
  4. Joseph Kesselman <> wrote:
    > 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.


    Is there anything that isn't lame about xml?

    - bloat your data into text, extremely verbose text
    - add lots of tags, let's say twice as many as needed
    - compress it into binary
    - then turn it back into text
    - then put more tags around it

    What the ****?
     
    Cydrome Leader, Oct 24, 2007
    #4
  5. 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
     
    Joe Kesselman, Oct 24, 2007
    #5
  6. thespamer

    Peter Flynn Guest

    On Wed, 24 Oct 2007 03:58:16 +0000, Cydrome Leader wrote:

    > Joseph Kesselman <> wrote:
    >> 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.

    >
    > Is there anything that isn't lame about xml?
    >
    > - bloat your data into text, extremely verbose text - add lots of tags,
    > let's say twice as many as needed - compress it into binary
    > - then turn it back into text
    > - then put more tags around it
    >
    > What the ****?


    There are few things more pitiable than a programmer who doesn't grok
    markup.

    ///Peter
     
    Peter Flynn, Oct 27, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony
    Replies:
    0
    Views:
    1,482
  2. ixtahdoom
    Replies:
    0
    Views:
    573
    ixtahdoom
    Jun 15, 2004
  3. Martin

    Compress ASP.NET Pages

    Martin, Oct 23, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    670
  4. ad
    Replies:
    1
    Views:
    489
    Cowboy \(Gregory A. Beamer\)
    Mar 6, 2005
  5. ad
    Replies:
    2
    Views:
    1,261
    Cowboy \(Gregory A. Beamer\)
    Mar 6, 2005
Loading...

Share This Page