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
2
votes
2 answers

how to ask XSD.exe to generate proper class for me, so that i can create a fine XML

I have created an XSD file from Visual Studio 2010, Then I use xsd /c mydemo.xsd to generate class for me, so that I can create a XML file at runtime. However, when I use that class, fill in some values, and serialize the object, the XML file does …
jojo
  • 13,583
  • 35
  • 90
  • 123
2
votes
1 answer

Does xsd2code uses xsd.exe or does it use its own code generation algorithm?

Does xsd2code uses xsd.exe or does it use its own code generation logarithm? xsd2code can be found here xsd.exe is the xsd generator tool from Microsoft
Bastien Vandamme
  • 17,659
  • 30
  • 118
  • 200
2
votes
1 answer

XmlSerializer generates wrong order of repeated sequence

When I have a repeater on a xsd:sequence for example: This would be the matching xml: e1 n1
i1
e2
nulldevops
  • 396
  • 3
  • 15
2
votes
1 answer

Should i use XML Serialization with large file

I have a set of very large XML data with XSD. One xml might be up to 300MB. I need to move data from XML into SQL Server. I found that Microsoft has serialization library to map xml into…
jojo
  • 13,583
  • 35
  • 90
  • 123
2
votes
0 answers

How to convert XSD to C# including comments in XSD?

We have an XSD that we consider "self documenting" in that each enum includes a friendly description. E.g.
Jonesome Reinstate Monica
  • 6,618
  • 11
  • 65
  • 112
2
votes
3 answers

DeSerializing an XML file to a C# class

Does anyone know what advantages (memory/speed) there are by using a class generated by the XSD tool to explore a deserialized XML file as opposed to XPATH?
Razor
  • 17,271
  • 25
  • 91
  • 138
2
votes
1 answer

Alternative to XSD.EXE in LINQ-to-XML?

Can LINQ-to-XML be used in a generic way to accomlish the intent of XSD.EXE, thus avoiding the usage of XSD.EXE
GilliVilla
  • 4,998
  • 11
  • 55
  • 96
2
votes
1 answer

Default Accessor Needed: Custom ConfigurationSection

I am totally confused by a simple Microsoft error message. When I run XSD.exe against an assembly that contains a custom ConfigurationSection (which in turn utilizes a custom ConfigurationElement and a custom ConfigurationElementCollection, as well…
user553671
2
votes
1 answer

Generating cXML classes from xsd throws error "The element 'uri:ds:Signature' is missing."

I'm trying to generate cXML classes for version cXML 1.2.034 as per http://cxml.org/ XSD (converted by visual studio). I converted the cXML.dtd to xsd. Then Tried running: xsd.exe cXML.xsd /c /language:CS /n:MyNamespace But it threw an error: Error:…
Evaldas Raisutis
  • 1,628
  • 4
  • 18
  • 32
2
votes
1 answer

XML Serialized from xsd.exe generated code using substitution groups is invalid (invalid xsi:type error)

I've generated some C# classes from some 3GPP XSDs (multiple XSD files/namespaces) and it works great for serialization apart from one problem with concrete instances of an abstract type used in a substitution group. Firstly, the relevant parts of…
zeroid
  • 701
  • 7
  • 19
2
votes
1 answer

Xsd.exe schema error: Undefined complexType 'http://www.w3.org/2001/XMLSchema:string' is used as a base for complex type restriction

How to solve this problem? Warning 2 Undefined complexType 'http://www.w3.org/2001/XMLSchema:string' is used as a base for complex type restriction. This is happening because of
Rudi
  • 3,124
  • 26
  • 35
2
votes
1 answer

xsd.exe just emits a single Object field when generating code from XSD

I have an XSD defined as follows (I anonymised the type names), you always get back a single element: Root…
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
2
votes
1 answer

Using .NET XmlSerializer for xml with different polymorphic roots

I have XML docs with different roots coming from one source. I have a XSD schema just like described in this question, with the abstract='true' root element 'BaseElem' of a Base type, plus additional root elements Elem1, Elem2, ... that extend the…
Yuri Astrakhan
  • 8,808
  • 6
  • 63
  • 97
2
votes
1 answer

deserializing HL7 CCD.xml file to native ClinicalDocument Class object

i'm new to hl7 healthcare domain and was assigned a task of serializing and deserializing CCD.xml file.i have successfully generated the ClinicalDocument class from CDA.xsd schema file using xda.exe tool.But as i tried something like XmlSerializer…
pavan kumar
  • 408
  • 5
  • 19
2
votes
1 answer

Multiple XSD files with same entities defined

Thanks for any help, We have two XSD files, both of them shares some same entities and some others different. Note that the one with differences are called differently. We want to generate C# code that can Serialize / Deserialize those entities,…
PBelanger
  • 1,269
  • 1
  • 13
  • 24