XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Not using mixed content? Then don't use XML

Roger,

I think that one value of XML is precisely what you say makes other 
mechanisms preferable -- the very fact that there are SO MANY other 
ways of representing data.

If you use CSV, I use JSON, somebody else uses SQL, and somebody else 
uses Java objects, then how can we share our data?  We have to 
transform most of it into some other form.  However, if we all use 
the same tool/format for our data, then we can share, exchange, and 
process it in that single format.  But which one?

As Jim Fuller pointed out, there is an incredibly complete and 
powerful toolset build around XML, which doesn't really exist for CVS 
(unless you want to count Excel) and is not only far from as powerful 
and complete for JSON but is highly unlikely to ever be.  SQL, of 
course, has wide acceptance and powerful toolsets, but is useable 
only within the context of an SQL database management system. Various 
programming languages don't really have *standard* external 
representations for the data they process, but only internal representations.

The point of having explicit (or implicit) metadata is not to be 
trivialized, either.  In fact, there are very, very large enterprises 
(some government, some private) that intermix XML data with RDF 
metadata (and data) to significantly leverage both.  That's not a 
characteristic of those other mechanisms for representing data.

(For the record, I am the editor for the international standard for 
SQL and have been for almost 30 years, plus I am employed by the 
predominant SQL vendor.)

XML is not a magic bullet, of course, and it won't solve all of the 
world's problems.  But it is a great tool for representing, 
exchanging, and processing data, with or without mixed content.

Hope this helps,
    Jim


At 3/23/2013 09:04 AM, Costello, Roger L. wrote:
>Hi Folks,
>
>First a few definitions:
>
>----------------
>Sweet spot
>----------------
>     A place where there a maximum response for
>     a given amount of effort.
>
>--------------------
>Mixed content
>--------------------
>     An element has mixed content if its content is a
>     mix of data and elements. Here is an example of
>     mixed content:
>
>     <condition>The patient exhibited <emp>extreme</emp>
>                        arrhythmia</condition>
>
>--------------------------------------------------------------
>Data-centric versus Document-centric content
>--------------------------------------------------------------
>     Data-centric content is where there is no mixed content,
>     document-centric content is where there is mixed content.
>
>-----------------------------
>Semi-structured data
>-----------------------------
>     A synonym for mixed content.
>
>
>Okay, now for the issue at hand:
>
>     Should you use XML?
>
>
>Sean McGrath says [1]:
>
>     XML's sweet spot is mixed content.
>
>     If you are not using mixed content, then there
>     are a trillion and one ways of representing data-centric
>     content, most programming languages do it out-of-the-box.
>
>     If you absolutely, totally, never, ever will need mixed
>     content then there are sane alternatives to XML.
>
>     There always has been alternatives, from humble CSV up to
>     fancier JSON/Python/Ruby direct data expression languages.
>
>     A huge chunk of the world doesn't need mixed content or
>     even know what it is.
>
>     It has always been a source of worry that folks with perfectly
>     good relational data sets have felt compelled by buzz-pressure
>     to put their content into XML - very little gain in the general case.
>
>
>Professor Daniel Lemire says [2]:
>
>     XML is great for dealing with semi-structured data.
>
>     Alas, we ended up torturing XML by applying it to ill-suited
>     purposes.
>
>     We must learn how to select the best format. Does your data
>     look like a table? Can a flat file do the job? Do you need a
>     key-value format like JSON? Or maybe a simple text file?
>     Take a good look at your data before picking a format for it.
>
>
>Conclusion:
>     If your problem doesn't need mixed content, then don't use XML.
>
>Comments?
>
>/Roger
>
>[1] 
>http://seanmcgrath.blogspot.com/2007/01/mixed-content-trying-to-understand-json.html
>
>[2] http://lemire.me/blog/archives/2010/11/17/you-probably-misunderstand-xml/

========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL)     Phone: +1.801.942.0144
   Chair, ISO/IEC JTC1/SC32 and W3C XML Query WG    Fax : +1.801.942.3345
Oracle Corporation        Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive      Alternate email: jim dot melton at acm dot org
Sandy, UT 84093-1063 USA  Personal email: SheltieJim at xmission dot com
========================================================================
=  Facts are facts.   But any opinions expressed are the opinions      =
=  only of myself and may or may not reflect the opinions of anybody   =
=  else with whom I may or may not have discussed the issues at hand.  =
========================================================================  



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS