This project is read-only.

int or integer in XSDs' base

May 5, 2010 at 1:02 PM

Hi there !!

Is it possible to configure somewhere that integer should be treated as int ?? Can not find any place /section for overriding of definitions :-)


thx in advance.



May 18, 2010 at 3:01 PM
Edited May 18, 2010 at 3:44 PM

Hi Laffern,

I am not sure what you are asking. Could you please provide more information?



Aug 26, 2010 at 11:38 PM

What I just learned (the hard way), is that if you specify your elements in your xsd's as datatype xs:integer, the WSFC.Blue tool will generate the properties/fields as strings.  If you use xs:int it generates them as the proper datatype (int).

Here is an example of the code that WSFC.Blue genrated for an XSD element with a datatype of xs:integer *notice the DataType= shows the integer datatype, however the code that was generated for the field uses string:

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(DataType="integer", Order=1, ElementName="exceptionCode")]
        public string ExceptionCode;


Aug 29, 2010 at 12:34 PM

Hi Dennis,

The xsd:integer data type represents a signed integer of arbitrary length, and because it is not bounded cannot be mapped to the Int32 CLR data type. The XML serialization process used by the .NET Framework maps xsd:integer to the String data type instead.

If you actually want to represent a 32-bit signed integer, then the xsd:int data type would be more appropriate. It will map directly to the Int32 CLR data type.