Re: Equivalence of hierarchical and flat data formats
Shlomi Fish <[email protected]>
| Newsgroups | gmane.text.xml.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 26 Jul 2022 20:02:06 +0000 Roger L Costello <[email protected]> wrote: > Hi Folks, > XML is a hierarchical data format. Can flat formats express hierarchy? > Answer: yes A hierarchical structure may be equivalently represented in a > flat structure. And vice versa. Why is this important? Answer: If data is in > one form, but the tools that are most suitable and efficient require the data > be in another form, then simply convert the data to the equivalent other > form. Below I demonstrate the equivalence of hierarchical and flat data > formats. 1. Equivalence of lists of data Below is a list of book data. A > hierarchical data format (XML) is used to express the list. <books> <book> > <title>Compilers Principles, Techniques, Tools</title> <authors>Alfred V. > Aho, Ravi Sethi, Jeffrey Ullman</authors> > <publisher>Addison-Wesley</publisher> <date>1986</date> > </book> > <book> > <title>Introduction to Compiling Techniques</title> > <authors>J. P. Bennett</authors> > <publisher>McGraw-Hill</publisher> > <date>1996</date> > </book> > <book> > <title>Economic Facts and Fallacies</title> > <authors>Thomas Sowell</authors> > <publisher>Basic Books</publisher> > <date>2011</date> > </book> > <book> > <title>Economics in One Lesson</title> > <authors>Henry Hazlitt</authors> > <publisher>Harper & Brothers</publisher> > <date>1946</date> > </book> > </books> hi Roger, I can argue that a finite stream of 0 and 1 bits is a flat data format: https://www.shlomifish.org/meta/FAQ/why_xml.xhtml also - why have you avoided replying to my posts? -- Shlomi Fish https://www.shlomifish.org/ https://is.gd/htwEXQ - Integrating GNU Guile into GNU coreutils Ken: [to Sarah] And who are you? Sarah: I’m Sarah Eisenman. A Jewish vampire slayer. And who are you? Ken: …Bitch! — https://www.shlomifish.org/humour/Buffy/A-Few-Good-Slayers/ Please reply to list if it's a mailing list post - https://shlom.in/reply . _______________________________________________________________________ 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: [email protected] subscribe: [email protected] List archive: http://lists.xml.org/archives/xml-dev/ List Guidelines: http://www.oasis-open.org/maillists/guidelines.php