XML versus HTML: An Example

I've mentioned that you can create your own tags in XML. This is such a powerful, vital part of XML that it bears further discussion. If you're used to working in HTML, this concept is probably very foreign to you because HTML does not allow you to define your own tags. Although various browser vendors have extended HTML with their own custom tags, the bottom line is that at some point you're stuck. You have to use the tags provided to you by your browser. You cannot make your own.

So how do you define a new tag in XML? The simplest answer is: You don't have to. You just use it. You can control which tags are valid in an XML document using DTD documents and XML schemas (we'll talk about each of these later), but the ...

Get Guru's Guide to SQL Server™ Stored Procedures, XML, and HTML, The now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.