RE: Help Needed
"Wayne Simmons" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
Just to play devil's advocate (as I was the one original posing this question in favor of XML). Mike T said: (XML) "... is infinitely configurable for hierarchical requirements" That's true, but ini files are greatly configurable for depth 2 requirements, and some formats can be cleverly leveraged into more (think multiple values on a single line). Mike T said: (XML) "is (or can be) human readable" This point is true. Readable however doesn't mean comprehensible. Any text based config file is "human readable." If the end-user is not versed in XML or has never been exposed to the concept of "well formed," they may not be able to understand it. Hopefully minimal training/learning could overcome this, but it depends greatly on who your target audience is. The final point on this is that XML has reserved characters ( & < etc..) which if involved could make it less readable for the novice. Mike T said: (XML) "includes built-in support for cross-referencing other elements and validating its own format" Only if you're using an XSD, which I wonder how many people make an XSD for their config file. If you're talking about when editing, the user must be using an XML editor not just a plain old text editor (POTE, is that an acronym yet?). Mike T said: (XML) "... is platform and language independent." Technically, isn't any text based configuration file? By platform I'm assuming you man OS/Hardware? By language I assume you mean programming language, unless you mean available libraries for parsing, any language should be able to support reading a text file. If you mean human language I think it would take MORE work to convert a non-English charset to use XML (considering you'd have to change how you looked for all the tags). Whereas a non-xml language would equally have a problem with non-english charset you'd have less work to convert or be more likely to explain the simplified version learning only a few words in a foreign language. Can you imagine trying to match tags in a foreign language? Mike T said: (XML) "... is designed purely for the requirement of tagging information unambiguously and transferring it between systems." Here you've hit a good one. I'm not sure everyone would consider configuration files as "tagged information" and the transferring between systems is important only if your config file resides somewhere other than your program is running. I do agree this is a true point and a valid argument for XML in general, I'm just not sure it applies to configuration. So while I half agree with many of your points and am still convinced XML has its place in configuration files, I now see the point for simpler configuration files too (ie non-XML like Config::Std which I played with over the weekend). As in most things, there are no absolutes, XML is not always the best choice for configuration, nor is it always the worst. Thank you pDale and the rest of the community for opening my eyes to another instance of the perl mantra: TMTOWTDI (There is more than one way to do it). -Wayne Simmons -- Software Engineer InterSystems USA, Inc. 303-858-1000 _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs