XML is Coming to Your Administrative Toolbox - Page 2

By  Carla Schroder | Apr 26, 2005
Page 2 of 2   |  Back to Page 1
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Continued From Page 1

Why You Need To Care
XML provides a common, cross-platform data exchange format. And because it uses plain text files the data are recoverable with simple tools, or even plain eyeballs. XML is in wide use these days — it's the default file format for OpenOffice, Gnumeric, Abiword, KOffice, and many other applications. Using a structured, machine-readable format means all manner of tools can be written to read and manipulate the data: export to different types of presentation formats, make large changes with small effort, and export to different applications.

OS X, GNOME and KDE all make extensive use of XML. This makes for faster, easier development and configuration of GUI interfaces. Contrast these with Webmin, which is a general-purpose Web interface for configuring Linux servers and applications. Every module must be custom-written for each individual application. Webmin is Perl-based, because only Perl can handle the parsing nightmare that characterizes the Linux/Unix configuration file universe. An additional advantage of Webmin is that you can apply manual edits and Webmin won't overwrite them. This is not true of many GUI configuration tools, as users of Red Hat, Mandrake and SuSE know. Using well-designed XML configuration files should make this sort of silliness a thing of the past.

Using XML opens up all sorts of possibilities: more accurate syntax checkers and markup validators, easier parsing and analysis of logfiles, easier customization and replication, easier scripting, easier reporting, and better cross-platform integration. In a nutshell, making the computer do more work and the human do less is a good thing.

XML Advantages
Sure, as hardworking system and network administrators the last thing we want to hear is "hey, here's another new technology to learn!" But XML isn't so difficult. It's a markup language that looks similar to HTML, with a major difference: In XML you can define your own tags. This gives you the flexibility to design a document however you need to, and being able to write descriptive tags makes a document more understandable. So you can almost make your files self-commenting.

For example, a common convention in a typical Linux configuration file is to use spaces and order functionally:


127.0.0.1	localhost	localhost.localdomain
192.168.1.5	windbag          windbag.kewldomain.net
If you forget and use a comma, or get your options in the wrong order, it won't work. With XML you can explicitly define each element:

<?xml version="1.0"?>
< hosts>
< localhost ip="127.0.0.1" hostname="localhost" domain_name="localdomain" </localhost>
<lan_hosts ip="192.168.1.5" hostname="windbag" domain_name="kewldomain.net" </lan_hosts>

So you don't have to worry about how to delimit spaces or what order to put options in, and searching for specific elements is dead easy, so changes are swift and sure.

Typing rafts of tags is less than fun. Fortunately the world is overfull of XML editors to lighten the load, and of course good old Unix standbys like Emacs, Vi, Joe, and other text editors can be customized to apply tags with simple keystrokes.

Learning XML
Of course there is more to this than simply applying a few tags. You need a schema file, and any XML pages that are displayed online need a corresponding stylesheet. w3schools has an excellent online tutorial. So there is no need to fear being swept away by the rising tide of XML-formatted configuration files. And anyway there is plenty of time to get up to speed- you can't convert existing configuration files without making their applications XML-aware, so for once we have the luxury of time.

Resources

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter
Helpful Links
  • Yankee Group Mobile WAN Optimization Report

    Mobile work continues to evolve. Your organization must keep up with the demands of its mobile workforce. This report introduces the concept of mobile WAN optimization and provides three case studies including RCM, PRTM and Einstein that highlight how this emerging technology can help IT departments achieve what previously appeared to be conflicting goals. Read >

  • Network Security Resources

    More threats than ever before pose a danger to today's enterprise network. Get the latest tips and intel on the newest risks in our guide to network security resources. Read >

  • Extreme Savings: Cutting Costs with WAN Optimization

    Did you know it's possible to cut IT costs without impacting day-to-day IT operations? In fact, when you download this whitepaper from Riverbed on cost-savings through WAN optimization, you'll discover how businesses of all different sizes have realized a return on investment in just a few months through significant hard cost savings in areas such as bandwidth reduction and IT consolidation. It's called Extreme Savings and its only from Riverbed. Read >