When there is no schema associated with an XML document, Oxygen 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: