Altova XMLSpy 2025 Professional Edition

Create and Edit YAML Documents

Home Prev Top Next

Create YAML documents

In XMLSpy, the .yaml and .yml file extensions have been defined as YAML file extensions. If you wish to add other file extensions for your YAML documents, then do this in the File Types section of the Options dialog. XMLSpy will treat documents with YAML file extensions as a YAML document and will enable XMLSpy's YAML viewing and editing features for these documents.

 

When a new YAML file is created with File | New, you will be asked if you want to assign a JSON schema to the YAML file.

 

If you assign a JSON schema (see "Validate YAML documents" below), then the new file will be created with a sample YAML document and displayed in a new window.

If you choose not to assign a JSON schema, then an empty YAML document is created in a new window. If you subsequently assign a JSON schema to the empty YAML document, then a sample YAML document based on the JSON schema is generated in the empty YAML document.

 

Edit YAML in Text View and Grid View

YAML documents can be edited in YAML Text View and YAML Grid View. Both views provide features such as auto-completion, entry helpers, visual aids editing, and validation while editing. In addition, Grid View enables you to see the document structure in table format and edit the document more easily and efficiently.

 

Check well-formedness and validate

Select the toolbar icon Check Well-Formedness (F7) to check the YAML document's well-formedness. This command is also available via the XML menu. Validation is described in the next topic, Validate YAML Documents.

 

© 2018-2024 Altova GmbH