document-oriented vs data-oriented vs object-oriented system

Hi,

I was reading as below.

In general XML is document-oriented and JSON is data-oriented. JSON can be mapped more easily to object-oriented systems.

I have not understood difference or similarities, advantages, disadvantage of each system like
document-oriented vs data-oriented vs object-oriented system

Please advise
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert BormansInformation ArchitectCommented:
XML found its history in SGML (also the ancestor of HTML by the way) and all three originally were meant as a markup language for narative documents, hence its document-oriented nature.
The analogy with HTML is interesting since that is what people usually understand as a markup language for narrative documents.
XML has a way to have what is called "mixed content", element content that has both text nodes and child elements
<p>some text with a <b>bold part</b> in it</p>
Very usefull for narrative documents that is

Very soon the machine processable, human readable markup language that was platform independent and could be used on the web, gained popularity for database serialisation and exchange
<row><cell1>data</cell1><cell2>data</cell2></row>
which is a clearly data oriented use of XML

The dual use of XML lead to some smaller frictions inside the community

document: whitespace = important; order is important; mixed content is important; datatypes are not important
data: whitespace is not important; order is not important; mixed content is a useless burden, datatyping is extremely important

For the web people started using JSON more often than XML, but it is a nightmare for modelling whitespace sensitivity and mixed content... hence it is mainly usefull for data use, less for document use

efforts exist to seemlessly map an XML document to a class in an object oriented programming language (databinding) Again, whitespace sensitivity and mixed content are a nightmare. It is a lot easier to map a JSON structure to an OO class than an XML in all its variety

I hope this makes sense
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.