Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Config Files Redux

by GrandFather (Saint)
on Nov 23, 2006 at 20:01 UTC ( #585775=note: print w/replies, xml ) Need Help??


in reply to Config Files Redux

Validation of the config file should only be a problem if it is not machine generated. If you are worried about validation then you are implying hand editing, and hand editing a large XML document is no fun at all! XML is, IMO, not suitable as a configuration file format intended for hand editing. Conventional .ini type files are much better in that regard and are generally pretty robust for parsing because their syntax is simple.

The underlying file format is completely independent of whether a file can be reloaded or loaded into a data structure. Many of the CPAN configuration modules do exactly that with a plethora of different configuration file types.

For persisting state where an application writes and reads the configuration files used XML can be usefull because it provides a somewhat human readable structure and there are standard tools around for viewing XML in a structured form. For exchanging information between different applications and using a DTD for mediation XML is very good. For large lumps of human editable configuration there are better solutions.


DWIM is Perl's answer to Gödel

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://585775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2021-10-23 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (86 votes). Check out past polls.

    Notices?