EDN Admin
Well-known member
Hi All,
I have an XSD file , using the XSD tool generate the classes enums etc.
in my XSD there is a section for a specific enum
<pre><xs:simpleType name="VideoType
<xs:annotation>
<xs:documentation>The video type</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string
<xs:enumeration value="RROI
</xs:enumeration>
<xs:enumeration value="DROI"/>
<xs:enumeration value="CROI"/>
</xs:restriction>
</xs:simpleType>[/code]
using the XSD produce the cs file:
<pre>/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://ElbitSystems/Skeye.Common.Infrastructure.Communication.SkeyeCommon.xsd")]
public enum VideoType {
/// <remarks/>
RROI,
/// <remarks/>
DROI,
/// <remarks/>
CROI,
}[/code]
what do i need to do if i want the generated class to start from 1 (or any other value) like:
<pre>/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://ElbitSystems/Skeye.Common.Infrastructure.Communication.SkeyeCommon.xsd")]
public enum VideoType {
/// <remarks/>
RROI =1,
/// <remarks/>
DROI =2,
/// <remarks/>
CROI =3,
}[/code]
Thanks in advance
E <hr class="sig Coder
View the full article
I have an XSD file , using the XSD tool generate the classes enums etc.
in my XSD there is a section for a specific enum
<pre><xs:simpleType name="VideoType
<xs:annotation>
<xs:documentation>The video type</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string
<xs:enumeration value="RROI
</xs:enumeration>
<xs:enumeration value="DROI"/>
<xs:enumeration value="CROI"/>
</xs:restriction>
</xs:simpleType>[/code]
using the XSD produce the cs file:
<pre>/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://ElbitSystems/Skeye.Common.Infrastructure.Communication.SkeyeCommon.xsd")]
public enum VideoType {
/// <remarks/>
RROI,
/// <remarks/>
DROI,
/// <remarks/>
CROI,
}[/code]
what do i need to do if i want the generated class to start from 1 (or any other value) like:
<pre>/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://ElbitSystems/Skeye.Common.Infrastructure.Communication.SkeyeCommon.xsd")]
public enum VideoType {
/// <remarks/>
RROI =1,
/// <remarks/>
DROI =2,
/// <remarks/>
CROI =3,
}[/code]
Thanks in advance
E <hr class="sig Coder
View the full article