Edit online

Learn Document Structure When Schema is not Detected

When working with documents that do not specify a schema, or the schema is not known or does not exist, Oxygen XML Editor can learn the document structure by parsing the document internally to provide an initialization source for content completion and document validation.

This feature is controlled by the Learn on open document option that is available in the Editor > Content Completion preferences page. This feature enabled by default. If you want to disable it, deselect the Learn on open document option.

You can choose to create a DTD from the learned structure and save it as a file using the Learn Structure and Save Structure actions.

Creating a DTD from Learned Document Structure

To create a DTD from the learned structure of an XML document, follow these steps:
  1. Open the XML document that will be used to create the DTD.
  2. Go to Document > XML Document > Learn Structure (Ctrl + Shift + L (Command + Shift + L on macOS)). The Learn Structure action reads the mark-up structure of the current document. A Learn completed message is displayed in the application status bar when the action is finished.
  3. Go to Document > XML Document > Save Structure (Ctrl + Shift + S (Command + Shift + S on macOS)) and enter the file path for the DTD.
  4. Click the Save button.