Create a DTD from Learned Document Structure

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

To create a DTD from the learned structure:

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