[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
david.lyon@c... wrote: > 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. > It's smaller, though somehow I doubt that's important, but I'll leave that point be. However, it is simply not true that the custom format you've invented has even one bit more of type information than the XML format. There is no rule anywhere that says that $ means an int or ? means a boolean or @ means a date. This is simply one interpretation of the plain text content, which you have written into your code. You could just as easily (probably more so) written knowledge into your code that sell_price and cost_price are ints, InStock is a boolean, and Arrival_Date is a date. The XML document in both cases contains pretty much the same information, none of which has anything to do with data types. In both cases, the types are inferred by the code processing the XML document. A different process might usefully infer different types, for instance using a double type or a money type for the sell_price and cost_price. (In fact, maybe that's what you meant. I don't remember.) The types are in your code, not i the XML. The real difference is that the more verbose format is much easier to process with XML aware tools like XPath, XQuery, XSLT, SAX, and XOM. Your custom format requires you to develop and maintain your own custom parser because you haven't used XML to markup the relevant structure. -- Elliotte Rusty Harold elharo@m... XML in a Nutshell 3rd Edition Just Published! http://www.cafeconleche.org/books/xian3/ http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|