Model structured documents with elements, attributes, namespaces, schemas, parsing, and transformations.
Lessons
Declare element content models in a DTD.
DTD Element Declarations is easiest to learn by reading the example, changing it, and observing the result.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE note [
<!ELEMENT note (to, from, body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ATTLIST note priority (low|high) "low">
]>
<note priority="high">
<to>Student</to>
<from>Teacher</from>
<body>Validate against the DTD above.</body>
</note>Practice the DTD Element Declarations example in a small scratch file, then explain what changed and why.