O'Reilly logo

XML and Java™ from scratch by Nicholas Chase

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Document Type Definitions

Eventually, we'll want to do an analysis of the different entities that we're relating together, but in beginning to build our DTD, we'll start off with an excerpt from our products.xml file.

Make a copy and save it in C:\xerces-1_2_3\data (or the appropriate directory on your system). Remove all but the first vendor, Conners Chair Company, as shown in Listing 3.1.

Listing 3.1. products.xml: The Data
0: <?xml version="1.0"?>
1: <products>
2: <vendor webvendor="full">
3:     <vendor_name>Conners Chair Company</vendor_name>
4:     <advertisement>
5:         <ad_sentence>
6:         Conners Chair Company presents their annual big three
7:         day only chair sale. We're making way for our new
8:         stock!  <b>All current inventory must go!</b> Regular ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required