[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: An unclear point with W3C XML 1.0 Specification


Re:  An unclear point with W3C XML 1.0 Specification
Hi Ron,

Yes, it may appear a little strange at first. But there
is logic behind it all.

What you have shown are two good examples of traditional
XML 1.0. No problems with those at all. Bog standard.

The answer to the question is that when multiplied out
a few tens of thousands of times, every extra character
and every parsing ambiguouity can slow the process of digesting
the data down, dramatically.

There isn't much difference between:

    <product_item>
      <part_description>3 1/2" Spanner</part_description>
    </product_item>

and:

    <product_item>
      part_description&="3 1/2^" Spanner"
    </product_item>

Counted, this gives 51 characters on the first part description
style, and 35 on the second according to my counting style (which
can make mistakes).

Add in the two tags to be fair, this gives (51+29)=80 characters, and
(35+29)=64 characters per inventory item.

But with 40,000 line items, an easily achievable inventory pricelist,
we get a saving of 760,000 bytes, or about 80% of the size of the
xml 1.0.

But make it more realistic, add in some more fields:

    <product_item>
      <part_description>3 1/2" Spanner</part_description>
      <sell_price>18</sell_price>
      <cost_price>15.50</cost_price>
      <InStock>False</InStock>
      <Arrival_Date>2005-02-15</Arrival_Date>
    </product_item>

and:

    <product_item>
      part_description&="3 1/2^" Spanner"
      sell_price$=18
      cost_price$=15.50
      InStock?=False
      Arrival_Date@=2005-02-15
    </product_item>

Style 1, 51+27+30+24+39+(29)=200
Style 2, 35+14+17+14+24+(29)=133

Once again, multiply by 40,000 items and the respective
file sizes are approximately:

Style 2 = 5320000 bytes
Style 1 = 8000000 bytes

In XML 1.0, we have a larger file with no type information
and in the computergrid format, we have type information as
well as a saving of around 35% or 2,680,000 bytes.

I guess they are the benefits of being strange as best as I
can explain it. I will stick to what I have got but thanks
for your comments anyway.

Best Regards

David



----------------------------------------------------------------

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.