Re: LibXML2 Indentation



On Wed, 2003-04-30 at 17:32, Chipzz wrote:
> You may not want to edit them, but suppose you (or a bug in a program)
> somehow screwed up your configuration. Then you could do:
> 
> mv .gconf .gconf-old
> gnome-session &
> diff -ur .gconf-old .gconf
> 
> and see what went wrong (which settings are actually different).
> THAT is an advantage of human-readable formats, not that you can edit
> them. But since gconf doesn't use indentation, everything gets put on
> one line, and this is essentially 100% useless. At which point you
> might just as well use a binary format, because it doesn't matter any-
> way.
> Having gconf indent its files may lead to easier bug-reporting, and
> not having to blow away your entire configuration because some program
> screwed up.

If you were going to diff XML files, the sane way is to use an XML-aware
diff tool in collapse-whitespace mode. This will ignore the whitespace
and only look at the structural changes, and at the same time report the
changed nodes in a far more sensible manner.

Ross
-- 
Ross Burton                                 mail: ross burtonini com
                                      jabber: ross jabber debian net
                                    www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]