[haiku-development] Re: Solarized Terminal color scheme

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 2 Sep 2015 22:28:15 +0200

On 02/09/2015 11:29, Adrien Destugues wrote:

2 septembre 2015 11:17 "Dario Casalinuovo" <b.vitruvio@xxxxxxxxx> a
écrit:
It would be even more useful if those files would be in XML and
used via a class that converts XML to BMessages :-)

It's something we will need at some point.

Here's one:
https://github.com/pulkomandy/fRiSS/blob/master/src/xmlnode.h
https://github.com/pulkomandy/fRiSS/blob/master/src/xmlnode.cpp

In Haiku there already is code to convert BMessage <> JSON, which is
cleaner and simpler.

Note that the usual way is simply saving things as archived BMessages
(in binary format), or, when manual editing is needed, to use te
driver_settings format and API (we have a wrapper to parse it to a
BMessage). I'm not sure XML is a good choice in either case: when the
user doesn't need to mess with the file, it is slower to parse than
archived BMessage. When the user needs to mess with the file, the XML
syntax isn't the most readable and easy to handle one.


There's also a writer and parser for a C-like BMessage dump format in
ThemeManager, although it's not very robust.

François.

Other related posts: