XML file compression
-
Hello Guys I am new to XML. I have started reading XML few days back. I have a question. Consider a table calling "Catalog" and has following column names "book" , "author", "title", "genre", "price", "publish_date" "description". XML representation of Catalog Table <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> <catalog> Compressed format of catalog table <?xml version="1.0"?> <Table = "catalog" enum{ book = 1, author = 2, title = 3, genre = 4, price = 5, publish_date = 6, description = 7}> </Table> <catalog> <1 id="bk101"> <2>Gambardella, Matthew</2> <3>XML Developer's Guide</3> <4>Computer</4> <5>44.96</5> <6>2000-10-01</6> <7>An in-depth look at creating applications with XML.</7> </1> <1 id="bk102"> <2>Ralls, Kim</2> <3>Midnight Rain</3> <4>Fantasy</4> <5>6.96</5> <6>2000-12-16</6> <7>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</7> </1> <catalog> So compressed format requires 20% less memory. I know that XML is user readable also. But while transferring huge XML data over the network, compressed format could improve the performance. And at the end (destination) we can decompress the compressed XML data. So my question is Why cant we use compressed XML??? I have no idea about this. Please let me correct if i am wrong. T
-
Hello Guys I am new to XML. I have started reading XML few days back. I have a question. Consider a table calling "Catalog" and has following column names "book" , "author", "title", "genre", "price", "publish_date" "description". XML representation of Catalog Table <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> <catalog> Compressed format of catalog table <?xml version="1.0"?> <Table = "catalog" enum{ book = 1, author = 2, title = 3, genre = 4, price = 5, publish_date = 6, description = 7}> </Table> <catalog> <1 id="bk101"> <2>Gambardella, Matthew</2> <3>XML Developer's Guide</3> <4>Computer</4> <5>44.96</5> <6>2000-10-01</6> <7>An in-depth look at creating applications with XML.</7> </1> <1 id="bk102"> <2>Ralls, Kim</2> <3>Midnight Rain</3> <4>Fantasy</4> <5>6.96</5> <6>2000-12-16</6> <7>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</7> </1> <catalog> So compressed format requires 20% less memory. I know that XML is user readable also. But while transferring huge XML data over the network, compressed format could improve the performance. And at the end (destination) we can decompress the compressed XML data. So my question is Why cant we use compressed XML??? I have no idea about this. Please let me correct if i am wrong. T
As I recall there is no need to change the XML structure, you can just zip (rar or whatever) the original file, send it and unzip it after (compressing algorithms are optimized for that)! For example I think that is what "new" Microsoft Word docx is all about.
-
As I recall there is no need to change the XML structure, you can just zip (rar or whatever) the original file, send it and unzip it after (compressing algorithms are optimized for that)! For example I think that is what "new" Microsoft Word docx is all about.
we can zip compressed file.