You can generate an XML file from your DTD if you want to quickly create an XML file based on your DTD file. Generating an XML file from your DTD saves you time by creating an XML file that is already associated with your DTD, and contains at least some of the elements and attributes in your DTD.
After you have generated your XML file, you can further customize it in the XML editor.
The following instructions were written for the Resource perspective, but they will also work in many other perspectives.
To create an XML file from a DTD file follow these steps:
If you do not select any of these options, then only the minimum amount of content required for the XML file will be created.
The XML file will only contain 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.
Related concepts
XML editor
Related tasks
Creating an XML file from scratch
Generating an XML file from an XML schema
Editing XML files