Altova XMLSpy 2025 Enterprise Edition

Check Well-Formedness

Home Prev Top Next
ic_well_formed        F7

The XML | Check well-formedness (F7) command checks the active document for well-formedness by the definitions of the XML 1.0 specification. Every XML document must be well-formed. XMLSpy checks for well-formedness whenever a document is opened or saved, or when the view is changed from Text View to any other view. You can also check for well-formedness at any time while editing by using this command.

 

If the well-formedness check succeeds, a message is displayed in the Messages window (screenshot below).

WellFormed

If an error is encountered during the well-formedness check, a corresponding error message is displayed (screenshot below).

Click to expand/collapse

Note that errors in the Messages window are displayed one error at a time.

 

Note:The Messages window has nine tabs. The validation result is always displayed in the active tab. So you can validate one XML document in Tab-1 and retain the result in that tab. To validate a second document, switch to Tab-2 (or Tab-3 if you like) before running the check. If you do not switch tabs, Tab-1 (or the active tab) will be overwritten with the results of the latest validation.

 

Validating from the Project window

The Validate command can also be applied to a file, folder, or group of files in the active project. Select the required file or folder in the Project Window (by clicking on it). Then click XML | Validate XML. You can also use the Validate XML on Server (high-performance) command. Invalid files in a project will be opened and made active in the Main Window, and the File is not valid error message will be displayed.

 

Note:The Messages window has nine tabs. The result of the well-formed check is always displayed in the active tab. So you can check the well-formedness of one XML document in Tab-1 and retain the result in that tab. To check the well-formedness of a second document, switch to Tab-2 (or Tab-3 if you like) before running the check. If you do not switch tabs, Tab-1 (or the active tab) will be overwritten with the results of the latest check.

 

It is generally not permitted to save a malformed XML document, but XMLSpy gives you a Save Anyway option. This is useful when you want to suspend your work temporarily (in a not well-formed condition) and resume it later.

 

Note:You can also use the Check well-formedness command on any file, folder, or group of files in the active project window. Click on the respective item, and then on the Check Well-Formedness icon.

 

© 2018-2024 Altova GmbH