From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a26758eec3c2e1ad X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-10 11:13:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Use of XML for config files Date: 10 Jun 2002 14:12:24 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3CFC5DB2.A21DCF61@cs.tu-berlin.de> <4519e058.0206041129.5b250124@posting.google.com> <4519e058.0206100702.5a4b431a@posting.google.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1023733184 18085 128.183.220.71 (10 Jun 2002 18:19:44 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 10 Jun 2002 18:19:44 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:25689 Date: 2002-06-10T18:19:44+00:00 List-Id: dennison@telepath.com (Ted Dennison) writes: > > > If we are to stick with simple attribute-value pairs, then XML would > > > be major overkill. > > > > In what way? I have a very small package that parses the subset of XML > > that I need to meet the Config_File spec (Glib.XML - 671 lines in the > > body). What's wrong with that? > > What's wrong is: > > 1) It could be *far* smaller than that, if we were parsing a simpler > syntax. Um, I don't see how. That's 671 total lines, comments and blanks included! Basically, it's a recursive function, looking for matching . Really simple. I suppose if I used OpenToken or something, the top level file would be smaller. This file is built on top of Ada.Text_IO. > 2) Its going to cause an explosion of arcane-looking XML cruft in > the config files, the vast majority of which is unneeded, except > that XML says it has to be there. What's the point of saying > ... all the time, if *everything* is an > item, and key is the only attribute we ever use? The file I'm currently generating doesn't look like that; it really is very simple. I posted a sample yesterday. I'll post a full trial implementation sometime soon. > I will cost us, in that it will make the file much harder for humans > to read. I'm particuarly thinking of the site maintanence engineers > who are the typical users of real-time system configuration files. > It also adds a source of errors, as its easy to forget an end tag or > transpose a letter somewhere. You really whould have trouble doing > that if your only syntax is "=". These are valid concerns. But I think you misunderstand just how simple the syntax generated by Glib.XML really is. Of course, it may be that it is not valid XML. > So again, I think its an important point that we should only do this > to ourselves if we are getting something back that we can't get out > of a more simple configuration file format. Yes. I agree. > -- -- Stephe