[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Not using mixed content? Then don't use XML
- From: James Fuller <james.fuller.2007@gmail.com>
- To: "Costello, Roger L." <costello@mitre.org>
- Date: Sat, 23 Mar 2013 16:41:19 +0100
Hello Roger,
I disagree that XML only virtue is managing mixed content ... its
generally good at a lot of things ... which is why it is so
contentious as you end up ensuring someone is unhappy. Its also got an
unbelievably complete technology stack ... not to mention that even if
your data is something simple like a tabular format ... if you need to
associated meta data, xml is prob the easiest way going (think of the
1000's of xml vocabularies out there) .
Technology selection is a game of risk mitigation ... at the developer
level one needs to balance off a lot of concerns (Get it done now, do
it properly, make it easy to maintain, integration, easy to extend,
documented ....) with most of the inputs being extremely vague.
If it makes any sense to say, my own personal decision making process
is driven more by what I dont know versus what I precisely know.
That is if I come to a project and the requirements are vague in terms
of data model (or docs) .. I will trend towards a more generalist data
format ... choosing XML means I can always escape to somewhere else if
needed (as an optimisation). Gold storage is a great example ... where
I want to retain the highest fidelity of information and be able to
slice and dice from there ... picking a 'more appropriate' final
format is good for the 'last mile' of integration but not as gold
storage.
Alternately, I can tighten up my data model in XML with schemas after
the fact, with very little 'bolt on' blowback ... so going schemaless
at first then enshrining things after is possible (as is the reverse).
abuse is the mark of a successful technology and lord knows XML has
seen its share ... there will always be benefit in text level
processing ... but evolution demands that something like markup (and
xml) is logical evolutionary step. XML is almost invariably always a
superset of any other approach to modeling data.
J
On Sat, Mar 23, 2013 at 4:04 PM, Costello, Roger L. <costello@mitre.org> 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/
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]