When is a good idea to save information in a XML file and when in a own-format file?
For XML (or other standard) I see:
For own-format files I see:
Use XML when it's a good fit in various ways:
Basically if there's a pretty natural representation of your data model in XML, that may well be the easiest way of handling it. If you'd end up having to mess around a lot to fit it in with XML, think about other formats. Note that there are plenty of other standard (or "somewhat standard" - e.g. supported by tools on multiple platforms) formats available beyond just XML.
For XML I see:
(-) It's tedious to hand modify.
I only use XML when the API requires it.
For JSON/YAML I see:
(+) It's easy to hand-modify.
I use JSON/YAML for almost everything. Except when an interface requires something else.
For CSV I see:
(-) It's a little murky when the column names are screwy or data isn't in simple first-nromal form.
I use CSV whenever possible.
For Language Serializers I see:
(-) nearly impossible to hand-modify.
I use serialized files once in a while to pass data among processes when I'm sure both sides are in the same language.
For own-format files I see:
(+) It can be easy to hand modify the files.
I avoid inventing my own file format. Haven't invented my own file format in years.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With