This section of the tutorial shows you how to generate an XML file based on your DTD (and associated with it) and then edit the XML file.
The XML file appears in the Navigator view and automatically opens in the XML source page editor.
The XML file only contains the selected root element and any elements or attributes contained in the root element. You can now add elements, attributes, entities, and notations to the XML file, however, they must follow the rules established in the DTD that you used to create the XML file.
The format element is not included in the generated XML file because you did not select to create optional elements in the steps above.
In the Design view, when you edit an XML file that has a set of constraints (or, a set of rules) defined by a DTD or an XML schema, you can turn those constraints on and off.
When constraints are turned on, you cannot make any changes that violate the rules of the DTD, such as adding an invalid element or removing necessary tags. Also, in this mode, you can use guided editing options.
If you turn constraints off, you can insert or delete any element or attribute regardless of the DTD rules. You may find it faster to work in this mode, but you may also introduce errors, so you should explicitly validate your XML file from time to time.
The CDTitle.xml file is constrained by the rules in the CDTitle.dtd file.
You are now going to edit the CDTitle.xml file in the Design view, at first with constraints on, and then constraints off:
You are now going to edit the CDTitle.xml file in the Source view and fix the errors that you introduced into the file:

The Design and Source views within the XML editor allow you to easily make changes to you XML file based on the constraints of the associated DTD. The grammar constraints option allows you to choose whether to apply the rules to the file at any given time.