PhpStorm 2026.1 Help

Generate a schema from an XML file

A schema is required for running structure validation checks on a web content file. PhpStorm can scan any XML file for the existing elements and attributes and generate a DTD for it.

Generate a schema from an XML file

  1. Open the file in the editor.

  2. In the main menu, go to Tools | XML Actions | Generate Schema From XML File. The Convert Schema File dialog opens.

    Convert Schema File dialog
  3. In the Output type area, specify the format for the generated schema. The available options are:

  4. Specify the encoding, indentation, and maximum line length.

  5. In the Output Destination field, specify where you want the generated schema file to be stored.

  6. Optionally:

    Click Advanced and specify additional options in the Advanced Conversion Options dialog that opens. For more information, refer to the RELAX NG official website.

Convert DTD to other schemas

  1. Open the .dtd file in the editor and select Tools | XML Actions | Convert Schema... from the main menu. The Convert Schema File dialog opens.

  2. In the Output type area, specify the format for the generated schema. The available options are:

  3. Specify the encoding, indentation, and maximum line length.

  4. In the Output Destination field, specify where you want the generated schema file to be stored.

  5. Optionally:

    Click Advanced and specify additional options in the Advanced Conversion Options dialog that opens. For more information, refer to the RELAX NG official website.

07 May 2026