Creating a DTD

See Also 

A document type definition (DTD) describes the grammar that can be used in an XML file and indicates the valid arrangement of the file's tags. It can exist as a prologue to an XML file (internal DTD) or as a separate file (external DTD). You can create a new DTD yourself, or you can automatically generate a DTD from an existing XML document.

To generate a DTD from an existing XML file:

  1. In the Files window, right-click an XML file's node and choose Generate DTD. Make sure that you have previously checked the XML file to ensure that it is well-formed.
  2. Type a name for the new DTD and click OK.

    The new DTD node appears in the Files window and is displayed in the Source Editor.

To create an empty DTD:

  1. From the main window, choose File > New File.
  2. Expand the XML node and select DTD Entity. Click Next to proceed.
  3. Type a name and package for the DTD.
  4. Click Finish to create the new file.

    In the Files window, the new DTD node appears under the package you specified. The DTD is also displayed in the Source Editor.

See Also
Generating DTD Documentation
Working With XML Schemas
Creating a Cascading Style Sheet

Legal Notices