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
5
votes
1 answer

XML deserialize iso 20022 pain.001.001.03 from xsd using c#

I want to get an object from an xml file. In my example I am using iso 2002 pain.001.001.03 I have downloaded the schema from pain.001.001.03.xsd and the xml file from pain.001.001.03.xml I have validated my xml against the xsd using this…
EduardoUstarez
  • 603
  • 11
  • 22
5
votes
2 answers

how can i use the file that is generated by xsd.exe in windows 10 universal app

I am generating .cs files from .xsd files using xsd.exe. But when I am adding the files to windows 10 universal blank app, I was getting error as "missing an assembly reference" for System.SerializableAttribute() and…
5
votes
1 answer

"The element is missing.." trying to generate class with

Using the XSD tool included with VS 2013, I receive the following message trying to generate a class from an xsd that contains - Schema validation warning: The 'http://www.w3.org/2000/09/xmldsig#:KeyName' element is not…
Keith Payne
  • 3,002
  • 16
  • 30
5
votes
1 answer

xsd.exe generated classes don't serialize default value attributes

I have few .cs files generated by xsd.exe by a XSD schema. My problem is that when i try to serialize those classes to xml, the attributes whose values match the default values defined in the xsd schema are not being serialized. I found out that…
Koynov
  • 1,499
  • 1
  • 10
  • 19
5
votes
1 answer

Xsd.exe generating unusable code with SubstitutionGroup/anytype

Ok. I'm trying to generate c# classes from: http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd (The xbrl schema basically). I am having problem with the tuple and the item. Here's what the xsd looks like:
Sleeper Smith
  • 3,212
  • 4
  • 28
  • 39
5
votes
1 answer

Creating Internal C# classes from XSD.exe

I'm writing a library that will accept an XML string as input which it will deserialize and do some transformations on. The output will be a separate XML file with a different schema. This internal XML will be following an internal Schema, which I…
Mats Fredriksson
  • 19,783
  • 6
  • 37
  • 57
5
votes
2 answers

Delphi Classes to XML representation:

Using Delphi XE: XML data binding wizard generates Delphi class based on XML/XSD - works great. BUT I also need to go the other way: Convert Delphi classes into XML. I don't find any support for that in XE. (I know this is quite simple to…
Vector
  • 10,879
  • 12
  • 61
  • 101
5
votes
1 answer

Generate XSD from types in assembly with xsd.exe, having dataannotation attributes on properties

I was hoping to reuse some viewmodel classes with dataannotations to generate xsd files for the purpose of validating (and documenting) xml files from 3rd party systems. Xsd.exe generates the .xsd files fine, but dataannotation attributes like…
Trygve
  • 2,445
  • 1
  • 19
  • 23
4
votes
0 answers

XmlSerializer and xsd:list

Is there an out-of-the-box way to deal with in XmlSerializer ? In my case I got a list of double, something like this:
Oyvind
  • 568
  • 2
  • 6
  • 22
4
votes
0 answers

is there a xsd.exe alternative with restriction support?

I have generated some classes using the VS 2010 version of XSD.exe. This works well for the class relationships, but it does not support restrictions other than choices. I need support for maxLength and pattern. Is there an alternative tool that…
Craig
  • 1,277
  • 2
  • 16
  • 29
4
votes
1 answer

Creating class from xsd with many imports

So I've ready alot of xsd documentation and similar questions but I've run into a problem: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than…
Vincent
  • 1,497
  • 1
  • 21
  • 44
4
votes
1 answer

Generating Classes from XSD schema

I am porting an old .NET 2.0 Library to a portable .NET Project. Target of the Project is Windows 8.1. My Library contains some classes which were generated by the XSD Tool by a XSD schema definition. Theses classes contain the [Serializable]…
Michael Meyer
  • 2,179
  • 3
  • 24
  • 33
4
votes
3 answers

XSD.EXE to generate F# Classes off of XSD

I am trying to use the tool XSD.EXE to generate some class files from an XSD. Whether there is anything to be gained from the resulting files is another question, but I would like to see what is generated. I found this reference, which…
akaphenom
  • 6,728
  • 10
  • 59
  • 109
4
votes
1 answer

Attribute for XSD to prevent XSD.exe FieldSpecified flags

I have an xsd file that has the following definition below. When using xsd.exe to generate classes from the xsd file, the enum attrs get an additional FieldSpecified property as visible below. Unless the FieldSpecified property is set, the value…
QueueHammer
  • 10,515
  • 12
  • 67
  • 91
4
votes
1 answer

xsd.exe generates weird C# class for XML serialization

I have an XML schema in .xdr file. This is a shortened version of this file(just for example):
nan
  • 19,595
  • 7
  • 48
  • 80