View Single Post
Silveras
Senior Member
 
Join Date: Aug 2010
Posts: 1,528

Old March 3rd, 2017, 07:27 AM
Quote:
Originally Posted by EightBitz View Post
Maybe I misread it, but I thought kb's question was generally in regards to "Why would ANYONE pull data from CSVs when they can just export the CSV to an XML?"
Yeah, he asked "How" not "why".

I see people looking at XML as some kind of magical format that, once data is in XML, everything is easy. That's a fairly naive view.

XML is a very flexible format for exchanging data between systems. Part of its value is that it is "self-describing", meaning that the XML file internally can tell you what kind of content is acceptable in a given record.

But what really makes XML shine for data exchange is having a DTD or XSD .. a definition of what is supposed to be in the XML data file. It specifies what records are required, which ones can appear more than once, what values they can have, and more. And those documents often represent agreement within an industry on a standard for data exchange... that's where XML becomes really valuable.

With a DTD or XSD (I forget the specific name DTD stands for, but XSD is "XML Schema Document"), programmers working on System A can write an export for data from System A, and programmers for any other system can write an import routine that can read that file and import it. If the XML document does not match what the DTD or XSD defines, it is "malformed" and will cause problems. The DTD or XSD can be used to "check" (validate) the document before attempting import and avoid having the import blow up in the middle of the attempt.

But the key here is that people ... programmers... still have to write both export and import routines that use that DTD or XSD as the guide. -- And, on this note, this is what is missing for data exchange between various VTT programs, or VTTs and other programs : an agreed-upon industry-standard definition of the data to exchange. (Not that it would be all that easy .. each Game System might well require a separate one because the underlying differences are too great.)

So exporting a spreadsheet (or anything else) to auto-generated XML as a file format isn't all that helpful. Because it is really just a heavily-annotated text file at that point. Someone would still have to do the steps you, EightBitz, are preforming ... pre-processing the raw XML into a form that matches the DTD or XSD.
Silveras is offline   #22 Reply With Quote