DTD Refresher

The Schema Recommendation has been approved for two years as this book goes to press. I wouldn't be surprised if you find some applications still using DTDs instead of schemas. Let's take a quick look at DTDs, using the XML representation of our simple CSV address book file (limited to only ten columns for brevity). Here's the instance document with two rows, followed by the DTD.

SimpleCSV with DTD (SimpleCSV1DTD.xml)
 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE SimpleCSV SYSTEM "SimpleCSV1.dtd"> <SimpleCSV> <Row> <Column01>Jones</Column01> <Column02>Mary</Column02> <Column03>312 Renner Road</Column03> <Column04>Apartment C</Column04> <Column05>Richardson</Column05> <Column06>TX</Column06> <Column07>75080</Column07> <Column08>USA</Column08> ...

Get Using XML with Legacy Business Applications 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.