Freigeben über


XML to Schema wizard for C#

I had a conversation recently where I discovered that a new "XML to Schema" template was going to be added to the default set of Item Templates shipped with Visual Basic in Visual Studio 2008 SP1.  This template is designed to kick off a wizard that generates an XML Schema (.xsd) file from an XML source and inserts it into your project.  For VB users, this is incredibly useful since the VB IDE uses these schema files to populate their IntelliSense lists for XML literals.  And of course, there's the added benefit of having a tool that can automate XML schema generation. 

You can check out this template at: https://msdn2.microsoft.com/en-us/vbasic/bb840042.aspx

This conversation got me wondering two things:

  1. Whether or not it would be worthwhile to add a C# version of this template to Visual Studio
  2. What other templates should be added/removed to Visual Studio? 

On the first point, since C# doesn't support XML literals directly in the language like Visual Basic does, the value C# users would get from having this extra template seems to be much less relative to that of VB users.  Of course, this doesn't necessarily mean that it wouldn't be useful for C# users.  Given this, it would be great to hear any thoughts you have on adding this template as a default template for C#. 

On the second point, since we're in the early stages of planning for our next release, it would be great to get any feedback on templates that you feel are either missing or are useless so that we can plan accordingly.

Comments

  • Anonymous
    September 01, 2008
    PingBack from http://www.easycoded.com/xml-to-schema-wizard-for-c/

  • Anonymous
    February 25, 2010
    Having a tool in the C# environment to infer a schema from an XML doc would take a lot of legwork out of schema definition. You have my vote for providing one!

  • Anonymous
    September 20, 2010
    Still no tool like this in visual studio 2010 for c#. Isn't it really not important :D