Questions tagged [xsd2code]

Xsd2Code is a CSharp or Visual Basic Business Entity class Generator from XSD schema.

Xsd2Code is a CSharp or Visual Basic Business Entity class Generator from XSD schema.

Available for visual studio

(Pro, Ent) 2017, 2015, 2013, 2012, 2010 & command line Frameworks supported

.Net 2.0, 4.6x, Net Code 3.0, .Net Standard, Xamarin Supported languages

100% native .Net C #, VB XML & JSON serialization

Generates the code to transform objects into either XML or JSON Customizable Code

119 questions
1
vote
1 answer

Xsd2Code help - generated code does not seem to match schema

I might be doing something totally wrong, but i created a simple test schema:
1
vote
0 answers

XSD2Code - Create a List of Objects when generate a class

I've created this XSD schema and I want to use XSD2Code to generate code. The problem I'm facing happens when I try to have a list of objects. It cannot recognize the complex type. XSD Example:
GeoKing88
  • 11
  • 1
1
vote
2 answers

How to use XSD2CODE generated C# classes

I am new to XSD world, I worked with XML but not much programtically. I have successfully generated C# classes using XSD2Code.Can somebody please guide me how can I use those generated classes using C# and use my XML to get validated. Code snippet…
Shax
  • 4,207
  • 10
  • 46
  • 62
1
vote
1 answer

Why are some XML tags not being deserialized

I used an externaly provided XSD to gerenate a C# codebase using Xsd2Code. Every 'vergunning' and 'product' gets loaded when deserializing the XML except for the BeperkingAlgemeen tag. I can't figure out how to manipulate the generated code so that…
MichielDeRouter
  • 426
  • 4
  • 21
1
vote
1 answer

Entity Framework Core create code-first base from xsd file

I have a xsd file and I need create MS SQL database from this file. I use code-first and try create classes for migration. I try use xsd2code++ and XmlClassSchemaGenerator, but generated classes contains arrays of primitive type and no connection…
e1s
  • 335
  • 4
  • 22
1
vote
0 answers

sxd2Code generated code deserializes xml files fine when run in VA2008/VS2010, but not when run from cmd

I have a schema file I used to generate corresponding classes in C# with xsd2code. When I run the application in VS2010 debugger, I get all the data from my xml file in, but when I run .exe from cmd, some of the data is not loaded. Any ideas why or…
Boroda
  • 195
  • 1
  • 7
  • 23
1
vote
1 answer

XSD Cannot generate classes but works on similar file

I converted a lot of xsd to C# in the past, but today I'm facing a new error message, for me: "cannot generate classes because no top-level elements with complex type were found." I have this problem on 2 files. I read a lot of posts about this, and…
Piero Alberto
  • 3,823
  • 6
  • 56
  • 108
1
vote
2 answers

Xsd2Code omits certain fields

I'm using Xsd2Code to generate classes from an XML schema. It works for some complex types like the following:
user598398
1
vote
0 answers

will RegularExpressionAttribute and other validators on Automatic properties work?

I'm using xsd2code for generating classes from schema. how ever I'm suspicious that auto properties can validate values or not? because if I enable AutomaticProperties in xsd2code here is what I get for member with Regex restriction.…
M.kazem Akhgary
  • 18,645
  • 8
  • 57
  • 118
1
vote
1 answer

JAXB class ref prevent enum generation

I've found this QA already and was able to prevent the generation of classes, but enums are still generated. I've tried to prevent it with custom binding:
D051P0
  • 398
  • 5
  • 17
1
vote
1 answer

xsd2code creates extra nested collection when serializing lists

I've been using xsd2code v3.4. So far I'm pretty close to getting it to work, however I'm facing one glaring issue and I can't seem to find any solutions. When my XML gets generated after I serialize my object, it's adding an additional complex…
dvsoukup
  • 1,586
  • 15
  • 31
1
vote
1 answer

Accessing Xml Element Attribute in a xsd class

I have a generated c# class from xsd. when I want to give value to the elements result res = new result(); res.feed = "123132"; // This works res.data here I can not find id and value, how can I do for instance res.data.id="something" I have an xml…
lol
  • 93
  • 3
  • 11
1
vote
1 answer

xsd2code element namespace prefix issue

I am using the xsd2code VS plug-in to create some data classes from a couple of xsd files and I'm having an issue where the namespace prefix for elements in the XSD do not appear in the generated XML files. XSD:
1
vote
1 answer

How to ignore the generation of fields and properties with the suffix specified using xsd or xsd2code

I have a C# Application that communicates with the server using Json. The server team has given me an xsd which I have used to generate C# classes with xsd2code. While doing this, for each field in the xsd, xsd2code creates 2 fields in the generated…
HelpMatters
  • 1,299
  • 1
  • 13
  • 32