• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

15. XML > Building an XML DTD

Building an XML DTD

Now that we’ve emerged from the gory details of XML DTDs, let’s see how they work by creating a simple example. You can create a DTD with any text editor and a clear idea of how you want to mark up your XML documents. You’ll need an XML parser and processing application to actually interpret and use your DTD, as well as a style sheet to permit XML-capable browsers to display your document.

An XML Address DTD

Let’s create a simple XML DTD that defines a markup language for specifying documents containing names and addresses. We start with an address element, which contains other elements that tag the address contents. Our address element has a single attribute indicating whether it is a work or home address:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint