473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Class generation from XSD and datatype mapping

Hi all,

I have the need to generate C# classes from XSD schemas, and the XSD.exe
tool is just (almost) great for that. I said "almost" because it seems that
every XML Schema datatype other than boolean is rendered as a String
field/property.

As an example, I am getting:

[System.Xml.Serialization.XmlElementAttribute(DataT ype="positiveInteger")]
public string Port {
get {
return this.portField;
}
set {
this.portField = value;
}
}

I would like to have:

[System.Xml.Serialization.XmlElementAttribute(DataT ype="positiveInteger")]
public UInt32 Port {
get {
return this.portField;
}
set {
this.portField = value;
}
}

More generally, is it possible to have datatype mapping include other value
types, such as Int32, or DateTime?

Thanks in advance, kind regards,
Vanni
Oct 29 '07 #1
0 1155

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: clintonG | last post by:
I'd like to know about application(s) or the name by which the following process is referred which would allow a business analyst to enter the following statements which when submitted would result...
1
by: Dave56 | last post by:
I am trying to create an class (in vb.net) that will serialize to produce xml as follows: ------------------------------------------ <?xml version="1.0" encoding="utf-8"?> <TotalCostData> <Ship...
4
by: Nikolay Petrov | last post by:
I am searching for an idea how to optimize some of my code. Let's say I have a class, which exposes some properties: Class Dummy1 Private m_sValue1 As String Private m_sValue2 As String...
3
by: Peter Kirk | last post by:
Hi I am reading metadata from a database (sql server) - for example metadata describing columns in a table. This metadata includes information about the datatype of the column - for example...
11
by: food4uk | last post by:
Dear all : I am not good at programming, please give a hand. My data structure is very similar as an array. I actually can use the std::vector as container to organize my data objects. However,...
3
by: toton | last post by:
Hi, I want to specialize template member function of a template class . It is creating some syntax problem .... Can anyone say how to do it ? The class is something like this template<typename...
1
by: Mani Jayadevan | last post by:
Sevket, Were you able to resolve the issue? I am facing the same problem. If you have already resolved it please let me know how you did it? Thanks Mani EggHeadCafe - .NET Developer...
5
by: tshad | last post by:
In VS 2003, I am setting up an abstract class that is setting up classes for each datatype of VB.Net (as well as C#). I am trying to set it up so that most of the work is done in the Abstract...
1
by: meyis | last post by:
hai i am meyis i need a java program code for date generation.(mssql-back end) Fields are fromdate and todate both field are datetime datatype. Button:-save,cancel,exit both dates are given by...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.