What Stops You From Using XML

You may think you have to learn about DTDs and XML Schema to use XML in your programs, but this could not be further from the truth. Plain old XML is a powerful way to represent configuration information, interprocess messages, and commercial data. To spec out how the XML document is organized, use a sample XML document and write notes about any requirements for the elements and attributes. A sample XML document is clear, informative and practical. And when the XML document organization changes (as it invariably will), it is easy and fast to change your sample XML document and notes.

DTDs and XML Schema are an entirely optional way of formally stipulating how the XML document is organized, and they have limitations. You will probably get to know one or the other of them in the future, but for the time being do not let them stand in your way (see also The Problem With DTD and XML Schema Validation). Here is a quote from the article "Q: I'm designing my own simple XML vocabulary, but I don't understand either DTDs or XML Schema. What can I do?" in XML Q&A at XML.COM:

 The focus on DTDs and XML Schema as the hallmark of so-called real XML has done more to damage XML's widespread use and popularity than all the usual culprits (proliferation of XML-related standards, proprietary extensions, and so on) combined.
John E. Simpson, August 29, 2001
 

In addition to the perceived complexities hindering the use of XML (see Keep XML Simple), there is also hesitation around adding dependence on a new and changing technology.

A lot of XML development is centered around web services on servers and clients that meet certain requirements such as particular versions of browsers, Java runtimes, and component services. This is a very important arena for XML; however, a different and equally important arena is the wide range of PCs (even Pocket PCs) where it is not practical to have these types of requirements. Although the COM registry and MSXML is on most machines, you may not want to depend on it if you only want simple XML processing.

An alternative to pre-compiled components and services, is third-party source code. Compiling a source code module into your program eliminates external dependencies and installation requirements placed upon your software by the third-party component. And, unlike with pre-compiled components such as libraries and ActiveX controls, you can change source code when necessary to fit your needs.

I have described here two main deterrents to ubiquitous XML. Firstly, the way the industry has focused on validating XML with DTDs and XML Schema has caused many developers to think this is a required part of using XML, but its not. Secondly, you do not need to add dependencies to your program to use XML, just use a simple source code product like CMarkup.