[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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] |
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
|