condensing XML
One problem with XML is that of the total size of an XML string or file, only a small proportion of it is actual data. The rest is the node and attribute names which describe the data, which are repeated constantly.
I am working on an application in which a large chunk of XML needs to be passed from one page to the next in a hidden field. I need to reduce the amount of bytes contained in this field. I'm thinking along the lines of somehow converting between XML and a delimited string. This would be easy enough if the data was in a straightforward tabular format, but its not. I need to somehow globaly define which attributes a node has, then list the data in those nodes, and nest other nodes in them.
Before embarking on this, I was wondering if anyone out there has done this before, or if there is a generic solution.
Some way of compressing and decompressing a very long string would be equally valid.
Cheers
|