xsi:schemaLocation is reserved for references to W3C XML Schema describing namespaces and its content is a sequence of alternating values of namespace URIs and corresponding schema paths. An XML documents can be linked with their schemas using the schemaLocation attribute. In order for the XML serialization process to produce this attribute, the following must settings must be set :
In the xsd2code++ settings, you can specify the SchemaLocation. This option can be found in the Serialization, XmlOuput, SchemaLocation section.
Of course it is necessary to enable the generation of XML attributes in the section "Output property settings", XmlAttribute.Enabled=true
The code that will be generated will contain an additional public variable in each of the classes so that the serialization makes the expected attribute:
As you can see the serialization has integrated the xsi:SchemaLocation attribute and the value defined in the xsd2code settings :