XML Developer Tip
(Receive this column in your inbox,
click Edit your Profile to subscribe.)

XML and Configuration Files
Ed Tittel

In a recent and wonderful

    Requires Free Membership to View

articles on the PerfectXML site, a bunch of XML heavyweights produced some interesting attempts to describe XML in 500 words or less. Their goal was to make XML intelligible to a Web developer who lacked a formal computer science background. This turned out to be amazingly tough, but also produced some great answers. The one I liked best not only helped me reaffirm my own understanding, it also help me to understand the phenomenon that is the subject of today's tip. This was from Steve Muench at Oracle Corporation: "XML stands for the 'Extensible Markup Language,' which defines a universal standard for electronic data exchange. It provides a rigorous set of rules enabling the structure inherent in data to be easily encoded and unambiguously interpreted using human-readable text documents."

I've been noticing lately an increasing tendency for applications and systems of all kinds to use XML-based configuration files rather than inventing their own arcane syntax. Many answer to the inevitable "Why?" also appear in the PerfectXML article already cited -- namely regular syntax, plenty of parsing tools, powerful representational capabilities, and human readability. In truth, these are also all extremely desirable characteristics are also desirable for configuration files as well, where readability is far from the norm (but valuable whenever troubleshooting or analyzing such files).

I made a quick hop to Google and searched on "XML configuration files" and was pleased to learn that this outlook has spread far beyond Microsoft (where XML configuration files are becoming far more common than other kinds). A random sampling of applications that use XML configuration turned up some interesting entries:

I could actually go on ad infinitum in this vein, but have hopefully made the point that XML works very well indeed for defining and capturing configuration data of all kinds. That said, this means working to capture configuration file content and structure in some kind of document description (be it an SGML DTD, XML Schema document, NG Relax document, or whatever) then using the heck out of its capabilities. Most experienced configuration hackers say this approach simply can't be beat: it's both human-readable and incredibly easy to parse, using existing and widely available tools.

Not surprisingly, the guys at PerfectXML also have some great coverage on this topic. If you'd like to read their take on this subject, check out: www.perfectxml.com/ConfigFiles.asp. Happy XML adventures!

About the Author

Ed Tittel is a 20-plus year veteran of the computing industry, who's worked as a programmer, manager, systems engineer, instructor, writer, trainer, and consultant. He's also the series editor of Que Certification's Exam Cram 2 and Training Guide series, and writes and teaches regularly on Web markup languages and related topics.

For More Information:

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.