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]
XML-formatted data is in a perfect form for human comprehension

Hi Folks,

As you read these words, inside your brain you are parsing them, you are creating a parse tree. 

This quote says it better: 

	Sentences, linear sequences of symbols,
	are really just serializations of parse trees
	we humans grok natively in hardware. To
	get an idea across to someone, we have
	to conjure up the same parse tree in their
	heads using a word stream. [The Definitive
	ANTLR 4 Reference, p. 11]

Now think about XML. An XML document is a parse tree. Let's see why. 

In the old days we would take this data:

	Parsing Techniques, Dick Grune/Ceriel J. H. Jacobs, 2007

create a grammar:

	Book --> Title Authors Date
 	Title --> string
 	Authors --> Author+
 	Author --> string
 	Date --> year

and parse the data using the grammar, to produce a parse tree.

The result is each item of data is labeled:

	Title: Parsing Techniques
 	Author: Dick Grune
 	Author: Ceriel J. H. Jacobs
 	Date: 2007

and the labeled items are structured into a tree.

With XML we have dispensed with all of that.  Or, rather, we have rolled all that into the creation of data. Allow me to explain. With XML, data is labelled:

	<Title>Parsing Techniques</Title>
 	<Author>Dick Grune</Author>
 	<Author>Ceriel J. H. Jacobs </Author>
 	<Date>2007</Date>

and is structured into a tree:

	<Book>
 		<Title>Parsing Techniques</Title>
 		<Authors>
 		 	<Author>Dick Grune</Author>
 			<Author>Ceriel J. H. Jacobs </Author>
 		<Date>2007</Date>
           		</Authors>
 	</Book>

So the data has been labeled and the structure of the data has been made explicit. XML is a parse tree!

Let's recap:
- The brain processes information as a parse tree
- XML represents information as a parse tree

Therefore, XML is the perfect form for human comprehension! 

/Roger


[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