I shall play the devil's advocate and defend
the use of XML files. Not a role I completley
believ in but some one needs to do it :)

On 7/5/07, Bob La Quey <[EMAIL PROTECTED]> wrote:
On my Ubuntu system
[EMAIL PROTECTED]:~/indivo-3.0$ locate .xml | wc -l
7837

That is a lot of files. Mostly config files of some sort.

Maybe not mostly config files.

[EMAIL PROTECTED]:~/indivo-3.0$ locate .xml | grep share/foomatic/db | wc -l
2696
foomatic is used for printer configuration

The files contain other info see [1] below.
These files are certainly readable. As far as
the code needed to use them, very good validating
parsers are available for both the SAX and DOM
mechanisms. One does not need to write _ny_ code
for parsing. All one must do is learn to use the
existing code.

[EMAIL PROTECTED]:~/indivo-3.0$ locate .xml | grep ubuntu | wc -l
950

My bad. Only one of these is a config file. The rest
are docs (in about 60 languages.)

indivo is a large client/server app written in Java and PHP
[EMAIL PROTECTED]:~/indivo-3.0$ locate .xml | grep indivo | wc -l
942

A beter estimate is
[EMAIL PROTECTED]:/usr/local/maven-2.0.7$ locate xml | grep indivo | grep
pom.xml | grep -v .svn | wc -l
86
Maven is a software project management and comprehension tool. Based
on the concept of a project object model (POM), Maven can manage a
project's build, reporting and documentation from a central piece of
information.

The pom schema is defined at
http://maven.apache.org/ref/2.0.4/maven-model/maven.html

Clearly, for better or worse, Maven is attempting to
deal with much more of the software development puzzle
than just configuration. Thus the need for a more
descriptive power than is provided by name=value.

This appears to be one major use of XML. One view is
that their is a need for a central repository for all
of the metadata and documentation associated with a
project. Config files are just a small part of that.

XML has more expressive power than name=value,
well tested validating parsers are available,
so it becomes a natural means to accumulate
this project data.

BobLQ "The emperor is wearing fancier clothes these days"

[1] Example of foomatic printer xml file.

I find this readable enough. It is pretty printed
and properly indendted. You need to use a non proportional
font on your viewer or it may look very ugly.

<printer id="printer/Samsung-CLP-600">
   <make>Samsung</make>
   <model>CLP-600</model>
   <mechanism>
       <laser/>
       <color/>
       <resolution>
           <dpi>
               <x>1200</x>
               <y>1200</y>
           </dpi>
       </resolution>
       <margins>
           <general>
               <unit>mm</unit>
               <top>4.23164</top>
               <bottom>4.23164</bottom>
               <left>3.175</left>
               <right>3.175</right>
           </general>
       </margins>
       <consumables>
           <comments> <en>
               Toner Black (4000 prints) - $80
               Toner Yellow (4000 prints) - $110
               Toner Magenta (4000 prints) - $110
               Toner Cyan (4000 prints) - $110
               Transfer Belt (35000 prints) - $47
           </en> </comments>
           <partno>CLP-K600A</partno>
           <partno>CLP-Y600A</partno>
           <partno>CLP-M600A</partno>
           <partno>CLP-C600A</partno>
           <partno>CLP-T600A</partno>
       </consumables>
   </mechanism>
   
<url>http://www.samsung.com/Products/PrinterandMultifunction/ColorLaserPrinters/CLP_600NXAA.asp</url>
   <lang>
       <proprietary/>
       <!--no pjl--><!--No "text"?-->
   </lang>
   <autodetect>
   </autodetect>
   <functionality>B</functionality>
   <driver>foo2qpdl</driver>
   <!--not "unverified"--><!--no "contrib_url"-->
   <comments> <en>

       The Samsung CLP-600 is a networked color laser printer with a
       2007 street price of $450 USD.  This printer is supported
       by the foo2qpdl open software printer driver.

   </en> </comments>
"/usr/share/foomatic/db/source/printer/Samsung-CLP-600.xml" [readonly]
54L, 1355C
1,1           Top


--
KPLUG-List@kernel-panic.org
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to