2.8. XML Validation

2.8.1. Code Generator

System Designer has an option to validate any XML against Code Generator. For example, you can see if the data type that you are defining is valid or not.

To validate the XML, select the XML view, select the XML file from the list of XML files used by the current project, then click the Check with CodeGen button.

Validate XML

Code Generator will generate code with the file that is selected in the XML File drop-down menu. The result of this operation will be shown once Code Generator finishes parsing the input file.

Validate XML result

2.8.2. Other Methods

Note

The XML validation described in this section uses the tool xmllint. See Prerequisites for more information.

System Designer automatically validates all the XML files included in a project against Code Generator when opening an existing project, and when adding an XML file to the project. This validation can be disabled in the Advanced Project Properties dialog.

Validation Advanced Property

You can also validate XML through the Projects menu. See Validate Project.