XML vs comma delimited text files

后端 未结 12 2692
面向向阳花
面向向阳花 2021-02-20 08:25

Ok, I\'ve read a couple books on XML and wrote programs to spit it out and what not. But here\'s the question. Both a comma delimited file and a XML file are \"human readable.

12条回答
  •  遇见更好的自我
    2021-02-20 09:05

    Among the reasons you may prefer XML over CSV (depends on the task at hand of course): * Almost all platforms and languages have existing libraries for reading, writing, parsing, and manipulating XML. * XML has well-defined rules for encoding all characters. CSV has ambiguities such as how to encode commas that are part of the data. * XML supports a variety of data shapes (like hierarchical) where as CSV is most useful when the data looks like a table (rows and columns).

提交回复
热议问题