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

Auto generate a class from a xml file

I'm working on creating a class file from the xml file but xsd is complaining saying "Cannot add a nested relation or an element column to a table containing a simplecontent column" and here is the sample xml. My actual xml file is very long with…
Kumar
  • 9
  • 2
0
votes
1 answer

XSD.exe changes parameters

I'm currently working with the XSD.exe tool to get classes of XSD files. But when I pass a file to the tool, it changes the path/file. string fileName = "C:\\TEST\\testFILE.xsd"; Process p = new Process(); p.StartInfo = new…
User81772
  • 66
  • 6
0
votes
1 answer

Looking for a smart command-line tool in Linux which can generate xsd out of xml

I can also settle for a web-based interface, but a good command-line tool is preferable. Now, I have tried to use xsd.exe that comes with mono-devel, but that skipped a whole bunch of stuff that was mentioned in the xml file. I understand that I…
Hamish Grubijan
  • 10,562
  • 23
  • 99
  • 147
0
votes
1 answer

Generate C# class from XSD (xhtml.blkstruct.class)

I have an xsd file, simplified as below with an element referencing the xhtml.BlkStruct.class. I have tried xsd.exe and xsd2code trying to generate a C# class from it, but I am always getting errors.
nogenius
  • 574
  • 1
  • 6
  • 18
0
votes
0 answers

XSD includes a XSD and in turn includes another

Ok I don't know if the title is specific enough, but I'm having a problem here. I have a XSD called "A"
Jorge
  • 71
  • 1
  • 13
0
votes
1 answer

Create C# class from reqif.xsd

I am trying to generate a C# class from the following ReqIF XSD file. I have tried with xsd.exe which failed and now also with xsd2code which fails with the following error message (translation: reference to undeclared attribute group): Xsd2Code…
nogenius
  • 574
  • 1
  • 6
  • 18
0
votes
1 answer

Deserialize XML Sequence Items C#.NET

I could not find a relevant topic, or maybe I did not search correctly. I am sorry if this has been answered already. I have the following XSD
A Kalli
  • 81
  • 1
  • 3
0
votes
1 answer

Xsd.exe generated class doesn't serialize mandatory elements when null value

In the following XSD all elements are mandatory:
metalheart
  • 3,740
  • 1
  • 23
  • 29
0
votes
1 answer

Free-form tagging or classification authoring interface

I'm trying to create a front-end interface for the following syntax, so a user can work with the output while authoring the input unknowingly. She…
Gallaxhar
  • 976
  • 1
  • 15
  • 28
0
votes
0 answers

XSD Generator uses the wrong sequence order for choice items

When using XSD.exe /c /l:CS /o:temp /order, it doesn't generate the correct order for choices that are in a Items[] array. XSD:
jsgoupil
  • 3,788
  • 3
  • 38
  • 53
0
votes
1 answer

XSD .Net nillable attribute

XSD element definition is: I am using .Net auto generated class to access the…
developer
  • 1,401
  • 4
  • 28
  • 73
0
votes
2 answers

Parsing XML Files by constructing an Object Model

I've always preferred using XSD.exe/VS.Net to generate schema, generate classes off the schema, deserialize xml file into object tree to parse an XML file. [Well, most of my requirements thus far have made this a perfect choice]. I've a crib though:…
Vyas Bharghava
  • 6,372
  • 9
  • 39
  • 59
0
votes
0 answers

Unable to cast object of type error in vb.net for a class created by xsd.exe

I used xsd.exe to create a class "AnnualReturnA" from this schema: http://xmlgw.companieshouse.gov.uk/v1-0/schema/forms/AnnualReturn-v2-6.xsd I am struggling with how to implement the class. I have put my test procedure and relevant snippets of the…
user1607914
  • 105
  • 1
  • 3
  • 12
0
votes
0 answers

xsd.exe not generating code for all elements

I am trying to generate a strongly typed dataset for the schema defintion located at: https://www.shpdata.com/xsd/CAHPSHospice.xsd The file defines 5 top level elements, 4 simple (like xs:int, xs:string, etc) and one complex. When the resulting…
Mike Cheel
  • 12,626
  • 10
  • 72
  • 101
0
votes
1 answer

XSD: Restricting length of one element based on the value of a second element

Given the following XML: 01234 10 I would like to restrict the length of based on the value in . will have fixed values, 10, 20 and 30…
Dirk
  • 884
  • 1
  • 7
  • 18