Create a DTD from Learn Document Structure Option

When there is no schema associated with an XML document, Oxygen XML Editor plugin can learn the document structure by parsing the document internally. This feature is enabled by the Learn on open document option that is available in the user preferences.

To create a DTD from the learned structure, follow these steps:

  1. Open the XML document for which a DTD will be created.
  2. Go to XML > Learn Structure (Ctrl + Shift + L (Command + Shift + L on OS X)).
    The Learn Structure action reads the mark-up structure of the current document. The Learn completed message is displayed in the application status bar when the action is finished.
  3. Go to XML > Save Structure (Ctrl + Shift + S (Command + Shift + S on OS X)) and enter the DTD file path.
  4. Press the Save button.