Integrating the DTD into the XML Document

Now that we have created the DTD, it is time to create an actual XML document. Remember that the XML document must conform to the supplier DTD we have just written.

In Table 12.2, we have identified some of the actual information that will be contained in the XML document. Again, note that the data is only contained in the end elements, not the aggregate elements, such as address and name.

Table 12.2. Adding the Values to the Table
ObjectCategoryFieldValue
supplier   
name  
 <companyname>The Beta Company
address  
 <street>12000 Ontario St
 <city>Cleveland
 <state>OH
 <zip>24388
product  
 <type>Vacuum Cleaner
 <price>50.00
 <count>20

To enter this information into an XML document, we can use a text editor, just ...

Get Object-Oriented Thought Process, The, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.