Questions tagged [xsd.exe]

The XML Schema Definition (Xsd.exe) tool generates XML schema or common language runtime classes from XDR, XML, and XSD files, or from classes in a runtime assembly. It is a part of the Microsoft .NET SDK.

References

346 questions
3
votes
3 answers

Have vs.net automatically execute xsd.exe everytime time xsd is modified

In the past, I have used XSD.exe to create c# classes from an xsd. Today, I added an XSD to VS.NET 2008 SP1 and it automatically generated a dataset from my xsd, slick but I don't want a dataset. Is there a way to have vs.net automatically execute…
Jake Pearson
  • 27,069
  • 12
  • 75
  • 95
3
votes
1 answer

How to impose minute restrictions on xsd:dateTime?

I have read that we can use minInclusive and maxInclusive restrictions on xsd:datetime fields. But how can I make sure that my dateTime field shall not occur more than 5 minutes into the future? I know how to handle it in java . But I want the…
3
votes
3 answers

How do I export multiple Excel rows to an XML file using an XML schema?

I have an Excel worksheet with a list of cars: I created an XML schema document to allow me to export the worksheet to XML. The schema is as follows:
user4142722
3
votes
2 answers

StackOverFlowException when generating C# code from xsd using xsd.exe (VS2010)

I am trying to generate C# code from an XML schema with xsd.exe with Visual Studio RC1 (version 10.0.30128.1) but get the follwoing error: C:\Development>xsd CR2008Schema.xsd /classes Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft…
Staffan
  • 31
  • 2
3
votes
2 answers

Transform XSD 1.1 schema to c# class

I have to transform an XSD 1.1 schema to an c# class. The problem is that xsd.exe does not support XSD 1.1, in fact if I try to create an c# class from that schema I get this error: Notice validation scheme: Element…
user3568107
  • 33
  • 1
  • 6
3
votes
2 answers

Deserializing classes from XML generated using XSD.exe

I have classes generated (using xsd.exe) from an .xsd that I can serialize just fine, but when I try and deserialize it, I get the error: {" was not expected."} I've searched for a couple of…
heap
  • 31
  • 1
  • 3
3
votes
2 answers

specify attributes on a nil xml element

This is a long one... I have an xsd, which specifies a complex type that can have a nillable element, but that element has a required attribute. Here is a simplified example:
Jeremy
  • 44,950
  • 68
  • 206
  • 332
3
votes
5 answers

Any way to override how element is binded by xsd.exe

I have the following elements in my schema:
code4life
  • 15,655
  • 7
  • 50
  • 82
3
votes
2 answers

WCF code generation for large/complex schema (HR-XML/OAGIS) - is there an alternative?

and thank you for reading. I am implementing a WCF Service based on a predefined specification (HR-XML 3.0). As such, I am starting with the schema, and working my way back to code. There are a number of large Schema documents (which import yet more…
Sasha Borodin
  • 193
  • 1
  • 1
  • 8
3
votes
1 answer

How to generate xsd from C# class file using visual studio command prompt?

I'm using the following command, but it's not working: C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin>xsd /c /l:cs SubsystemReg.cs Lets say this is my Class: using System; using System.Collections.Generic; using System.Linq; using…
user3264676
  • 253
  • 5
  • 8
  • 20
3
votes
1 answer

Representing a repeated pair of XML elements in XSD

I am currently having a problem with an XSD. Normally an entry looks like this: Something 1234 2013-01-07 2013-01-09
3
votes
2 answers

basic XSD importing and xsd.exe?

I have a main xsd built against another one containing shared types (they are in the same directory). That's the header of the main one :
LB40
  • 12,041
  • 17
  • 72
  • 107
3
votes
2 answers

Why do some generated C# class properties not match the XSD attributes?

I'm generating C# classes from an OTA (Open Travel Alliance) XSD file. You can download the XSD file from here. I create the C# class with the following command in a Visual Studio Command Prompt: xsd FS_OTA_VehLocDetailsNotifRQ.xsd /classes…
Bernhard Hofmann
  • 10,321
  • 12
  • 59
  • 78
3
votes
1 answer

Class name being prefixed with class name of parent node: CS code generation from XML using xsd.exe

I am trying to generate a C# file from a XML file using xsd.exe. I am facing a problem that every class is prefixed with the class name of its parent node. So it is generating very long names, depending on the depth of an XML element. I am posting a…
sabertooth1990
  • 1,048
  • 1
  • 13
  • 19
3
votes
3 answers

Are XSD always generated using third-party tools?

I am a beginner with XML. I can do DTD fairly well. While learning about XSD and how to generate it, I found that all the tutorials available on Google and those on YouTube create XSD using third-party tools. For Windows they use either VB or…
An SO User
  • 24,612
  • 35
  • 133
  • 221