Create a DTD from Learned Document Structure

When there is no schema associated with an XML document, Oxygen XML Editor 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 Document > XML Document > Learn Structure (Ctrl Shift L (Meta 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's status bar when the action is finished.
  3. Go to Document > XML Document > Save Structure (Ctrl Shift S (Meta Shift S on OS X)) and enter the DTD file path.
  4. Press the Save button.