The
<xsd:element name="CVCCodeSwitch " type="xsd:integer" nillable="true"/>
should be fine (only integer is allowed); you're probably confused because
<CVCCodeSwitch />
is not nil; nil xml element looks like
<CVCCodeSwitch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nil="true" />
(You can omit the xmlns:xsi if you've already declared it at higher level)
If you have no control over xml (i.e. you have to write xsd according to xml you already have) you have to declare type as union of integer and empty string:
<xsd:element name="CVCCodeSwitch">
<xsd:simpleType>
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:integer" />
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value=""/>
</xsd:restriction>
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
</xsd:element>