Can anyone tell me what is the difference between XSDObjectGen.exe & XSD.exe?
Is there any way to make XSDObjectGen.exe work in dot net 2.0?
What is 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.
What .NET class transforms elements defined in XML schema definitions to common language runtime compatible data types?
XsdDataContractImporter will transform a set of XML schemas and create the . NET Framework types that represent the data contract in a selected programming language.
As an alternative, there's Xsd2Code. Some features:
- Generate partial class.
- Support generic and custom collection (List, ObservableCollection, MyCustomCollection).
- Support automatic properties when no special get or set is required.
- Can generate WCF attributes (DataContract/DataMember).
- Support nillable type.
- Mask private field in IDE (use EditorBrowsableState.Never attribute).
- Generate object allocation in constructor.
- Implement INotifyPropertyChanged for enable DataBinding for wpf or Silverlight.
- Improves productivity with visual studio add-in.
- Generate summary documentation from xsd annotation.
- Check if the new and old values int setter are the same before raising property changed event.
- backup options generation in cs or vb header.
- Save and load Xml document into isolated file storage for silverlight app (new in 3.0).
- Generate CS, VB or CPP code.
- Serialize/deserialize object.
- Save into file and load from file.
- Include Xsd2CodeCustomTool.
The difference is:
- The XML Schema Definition Tool (
xsd.exe
) is part of the Visual Studio SDK and has basic functionality.
- The XSD Sample Code Generator Tool (
XSDObjectGen.exe
) is a more fully featured tool with more advanced features, and is released separately.
To give you some idea, here is a summary feature list for XSDObjectGen.exe
:
- Support for the most popular XML schema constructs
- Enumerator and Collection behavior for repeating elements
- Programming model that matches schema
- Automatic sub-class construction
- Name collision avoidance
- Visual Studio IDE integration
- Special handling logic for DateTime types
- Multipart schema support
- XML namespace serialization
- Optional and Sequence support
- Choice Support
- Substitution group
- MakeSchemaCompliant method
- Non-optional reference-type handling
- WS-I.org basic profile compliance
- Multi-programming language support
- Depth-wise Traversal Events
For more details on these features see the XSDObjectGen.doc documentation file (available in C:\Program Files\XSDObjectGenerator
after you install the tool).