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
3
votes
4 answers

xsd2code multiple xsd file create duplicate sub classes

I am using xsd2code to generate classes from the xsd schema provided by the star standard. I did try to use xsd.exe to generate the classes, but it did not do a good job. When I generate the class from 'ProcessCreditApplication.xsd' it generates a…
TonyAbell
  • 1,310
  • 4
  • 19
  • 28
3
votes
2 answers

How to deserialize an empty XML element when is used instead of

I have an XSD schema and XML file which is used to build components at runtime. These objects can have custom settings. In the XSD file, this is defined as:
VoteCoffee
  • 4,692
  • 1
  • 41
  • 44
3
votes
0 answers

XSD to C# multiple defined types Ambiguity

I have been given multiple large XSD's that redundantly define the same types. The end game i'm going for is to be able to generate C# classes from these XSD's with the same(ONE) namespace while not having hundreds of 'namespace already contains a…
Archangel33
  • 496
  • 8
  • 22
3
votes
2 answers

XSD.EXE gives error when Multiple Elements Generation when Files have cross references

I have orbitz (global hotel distribution system) xsd schema and want to generate c#.Net classes from these xsd files. When I use Xsd.Exe or XSD2Code or something else, generated classes copies complex types from imported files to inside, so multiple…
AltugCan
  • 108
  • 6
2
votes
2 answers

pass xml and get strongly typed .NET OBjects

I've been using Linq To XML in order to mapp the XML DOcument to .NET OBjects. Could anyone please guide me whether there any too exist where I can pass XML Document (string) and it returns strongly Type .NET OBject? I've been looking at XSD2Code…
Nil Pun
  • 17,035
  • 39
  • 172
  • 294
2
votes
1 answer

Why has an xsd file code behind files. What are they for?

Can anybody explain me why an xsd file has 2 sub files (.cs and .designer.cs) and what they are for? As for the designer.cs, in our case it is generated by Xsd2Code. Why would you do that?
HerbalMart
  • 1,669
  • 3
  • 27
  • 50
2
votes
1 answer

How to make Json.NET set IsSpecified properties for properties with complex values?

I have a web service built with ASP.Net, which until now only used XML for its input and output. Now it needs to also be able to work with JSON. We use xsd2code++ to generate the model from a XSD, with the option to create "IsSpecified" properties…
AdSNobrega
  • 23
  • 1
  • 6
2
votes
0 answers

Xsd2Code auto properties not working?

I'm using Xsd2Code to generate a C# serializer/deserializer class for my XSD file. Also I have enabled the generation of auto properties. Problem #1: Xsd2Code still generates private fields in addition to the auto properties. This should not be…
Boris
  • 8,551
  • 25
  • 67
  • 120
2
votes
1 answer

java.io.StreamCorruptedException: invalid stream header: 3C787364

I am getting this error when converting inputStream into ObjectInputStream. Please help me regarding this. My Code: InputStream isSchema = Thread.currentThread() .getContextClassLoader().getResourceAsStream("schema.xsd"); …
Ramkumar
  • 154
  • 5
  • 11
2
votes
1 answer

WPF TreeView HierarchicalDataTemplate Unlimited Nodes

I am having problems populating my treeview beyond the first level when the xml is using the same class name to have unlimited levels. I have used Xsd2Code to create the object class. To keep this post from being 3000 lines long, I am including a…
Ryan
  • 791
  • 16
  • 31
2
votes
1 answer

InvalidRegex: Pattern value '(?:Y|N)' is not a valid regular expression.

I have used regular expression for yes no type. but compiler throwing exception like this. Type for yes and no inputs. …
Ramkumar
  • 154
  • 5
  • 11
2
votes
1 answer

How to rename enum ItemsChoiceType generated by XSD.exe?

When you are generating c# class from XSD any choice will be represented as enum. And i didn't find any way to make this name custom. The problem is that when i'm using 2+ choices in xsd generator will produce ItemsChoiceType, ItemsChoiceType1,…
dr11
  • 5,166
  • 11
  • 35
  • 77
2
votes
1 answer

Parsing XML (using class generated by xsd.exe) - Error: There is an error in XML document (83, 8)

I have this XML file that I would like to parse into an object in C#: 001-0180914-5787994.xml (http://pastebin.com/bzzAnsQL) So, I opened this xml file in VS Express 2013 for Desktop and clicked on the XML -> Generate Schema menu option. This…
Latheesan
  • 23,247
  • 32
  • 107
  • 201
2
votes
0 answers

Xsd2Code VS 2012 Attribute

I use Xsd2Code in VS 2012 to generate classes from a xsd file. First I create a xsd File from the following XML: 1 Student 1
Xyz…
user3206010
  • 141
  • 2
  • 16
1
vote
1 answer

What is the maximum number of elements in an XML document if the XSD does not specify maxOccurs?

I have an XSD schema that defines multiple elements in a document. Two sets of the elements I expect to be collections. One set of elements is defined like follow:
Steve
  • 1,557
  • 2
  • 17
  • 34