What XML Isn’t

The previous section spells out what XML is — an extensible markup language that allows you to create your own tags to develop XML applications. Now it’s time to clarify what XML is not.

It’s not just for Web pages anymore
Although the World Wide Web Consortium (W3C) developed XML, it’s not specifically designed only for Web pages. In fact, if you display an XML document on the Web in its raw form (without adding styles to format the display), all you’ll see is the XML markup itself. So banish this Web-only idea from your thoughts. XML is a markup language that allows you to organize information by creating tags to construct a specific document structure. XML documents can be viewed on the Web, but unlike HTML documents, they’re not limited to the Web.
Browser support for XML is limited and variable. Hopefully this will change in the next generation of browsers, but for now XML works well in Web pages only when combined with another language (CSS) or XML technology (XSLT) to format the display of the XML information.

It’s not a database
Whether XML “is” a database depends on your definition of database. If you’re defining a database as a collection of data, then yes, XML qualifies as a database. If you’re defining a database as a Database Management System (DBMS) program, such as Microsoft Access, XML has some DBMS features (storage, queries, programming interfaces) but doesn’t have others (queries across multiple documents, security, indexes). So, okay, you could use XML as a database for a small amount of data — but it wouldn’t be efficient to use XML as a database for large amounts of data. (Why would you want to, when DBMS programs are designed to do exactly that?) That’s not to say XML is in any way database unfriendly. XML documents work well for both input and output, going to an from a database — and you can also use them to display database information in print or on the Web.

It’s not a programming language
One of the most common misconceptions about XML is that it’s a programming language. Although XML can be used with programming languages for certain types of application development, it’s a markup language, not a programming language. A markup language is essentially descriptive; a programming language is for issuing logical commands. Programming languages include (for example) variables, datatypes, operators, loops, functions, and
conditional statements. XML doesn’t include any of these features, so it’s no programming language.

Part of the confusion here is that some XML document types do include some features found in programming languages. For example, XML Schemas (which are themselves XML documents) include several built-in datatypes and also allow user-defined datatypes. But wait a minute: Although XML Schema documents can include datatypes — one feature of programming languages — that doesn’t make them full-fledged programming languages with all the features just listed here. They remain XML documents — with an XML document structure, created with a markup language (XML). You can get XML to describe how a document will look; you can’t get it to dim your house lights or start your car — at least, not without some help from an actual programming language.

Related Posts by Categories

Widget by Hoctro

Enter your email address:

Delivered by FeedBurner


Source Code