From the course: XML Essential Training (2018)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Associating a DTD with XML data

Associating a DTD with XML data - XML Tutorial

From the course: XML Essential Training (2018)

Start my 1-month free trial

Associating a DTD with XML data

- [Instructor] We're going to wrap up our discussion on DTDs by picking up where we left off on the last exercise and creating an external DTD that we can associate with more than one XML file. This is the business card XML file, which is in a state where we last left it in the previous exercise. To create an external DTD, let's open up the businesscard.dtd file; and you'll see that it's empty. What I'm going to do is copy the contents from inside the document type definition in this file, and I'm going to copy starting from the element business card all the way down to the element email. I'm going to copy that over to this file here; and I'll paste it in, and I'll save it. So now I need to get rid of the contents in this file. I got to get rid of those square brackets. Now I'm going to type the word, system; and then in quotes I'm going to type businesscard.dtd. Now the value that's in these quotes right here indicates that there's no path involved with the businesscard.dtd file…

Contents