QoS File XML Validation

This article illustrates how to enable XML validation in a QoS file.

Many of the sample USER_QOS_PROFILES.xml files include an XML schema file (XSD) to assist in option selection (auto-completion) and syntax validation.  Normally, this option is commented out by default.   

As an example, consider the standard USER_QOS_PROFILES.xml file supplied with the hello_builtin example -- in this case lines, 35-36 are commented out.


To enable XML validation, that line must be uncommented and the original <dds> line removed:  

When used with an XML-aware editor, such as Visual Studio or Eclipse, the included XML schema file graphically assists in option selection and validation.

In the example below, the options for the logging verbosity are shown:

As a note, RTI schema files are also supplied as part of the Connext installation, so instead of using the XSD http link, the equivalent local link can also be used:

e.g. <dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="C:/rti_connext_dds-6.0.0/resource/schema/rti_dds_qos_profiles.xsd">

Using the local XSD file is useful in cases where an internet connection is not available  (e.g. a secure lab).