locked
Visual Studio 2010 XSD Editor RRS feed

  • Question

  • I have worked with VS2005 XSD designer. it contains a visual editor which I did not see it in neither VS2008 and VS2010. (In VS2010 there is just an XSD visual viewer not editor.

    What could I do in VS2010?

    Saturday, April 24, 2010 10:43 AM

Answers

  • Farhad,

     

    XSD Editer was removed since VS2008, and here explains why http://social.msdn.microsoft.com/Forums/en/csharpide/thread/87d25c88-a11e-4cbc-890e-a347cc58bdc8

    Quoted from that post:

    "This has been discussed many times before. VS fully supports editing XSD files just like it does XML. There is Intellisense support and everything. What it does not support anymore is a graphical editor. The reason why a graphical editor is not a great option is because of the memory required to support it. Graphical editors generally rely on the XMLDOM. The XMLDOM is a legacy component with hideous overhead. Anything above a 4MB XML file and things get really bad. Go to 10MB and you can easily use several hundred MB just for the one file.

    Having said that do note that the XML Schema Explorer is available for viewing a hierarchial interpretation of the schema. It provides a few features but it is not a full-blown schema editor. If you need to do graphical schema editing then you'll need to use an external tool."

     

     



    Wednesday, August 17, 2011 6:08 AM

All replies

  • That XSD editor (the table/relational one with the yellow background) was removed.  It was great for some things, poor for others... It is no longer in Visual Studio.

    Tuesday, April 27, 2010 10:55 PM
  • Believe me the only word I can use for it is asinine. You have relatively good thing, you rip it out and you replace it with zilch! Way to go guys! Super!

    Saturday, January 22, 2011 3:58 AM
  • There are possibilities.  There are open source and commercial editors, some of which are better than what Visual Studio ever provided.  Previously, I downloaded the open source Eclipse (http://www.eclipse.org/downloads) IDE and used its XML Schema editor.  The first/main download link there should have what you need.  Pretty good.  Yeah, it might seem overkill to download that whole thing, but computers have lots of disk space.  Was worth the inconvenience.

    • Proposed as answer by Hubery Yuan Wednesday, August 17, 2011 5:37 AM
    • Unproposed as answer by Hubery Yuan Wednesday, August 17, 2011 5:37 AM
    Saturday, January 22, 2011 4:42 PM
  • I went to create an XSD in Visual Studio 2010 for the first time, thinking surely there would be a really good designer in this release.  What a disappointment to find out that there is absolutely NO designer whatsoever.  Thanks for nothin... literally... and sarcastically.  I've been towing the Microsoft line for 25 years, but as time goes on I get more and more frustrated.

    There is the perception that graphical authoring exists... but when it comes right down to it, it is nothing but visual read-only.  You have to drop into old fashioned XML editor mode to actually create your schema.  It's been a few years since I've done a lot of XSD work, and I don't remember all the markup syntax.  Sure would be nice to have a graphical tool that let you create your schema and it generated the markup.

    How can a set of tools as advanced as Visual Studio 2010 not have an XSD editor?!

    Friday, August 5, 2011 2:24 PM
  • Farhad,

     

    XSD Editer was removed since VS2008, and here explains why http://social.msdn.microsoft.com/Forums/en/csharpide/thread/87d25c88-a11e-4cbc-890e-a347cc58bdc8

    Quoted from that post:

    "This has been discussed many times before. VS fully supports editing XSD files just like it does XML. There is Intellisense support and everything. What it does not support anymore is a graphical editor. The reason why a graphical editor is not a great option is because of the memory required to support it. Graphical editors generally rely on the XMLDOM. The XMLDOM is a legacy component with hideous overhead. Anything above a 4MB XML file and things get really bad. Go to 10MB and you can easily use several hundred MB just for the one file.

    Having said that do note that the XML Schema Explorer is available for viewing a hierarchial interpretation of the schema. It provides a few features but it is not a full-blown schema editor. If you need to do graphical schema editing then you'll need to use an external tool."

     

     



    Wednesday, August 17, 2011 6:08 AM
  • Here is information that may help others, just in case you happen to find yourself in my shoes.  I am...

    • A complete newbie with XSD's.  I never worked with DTD's, and I think it's cool that now I don't have to learn and unlearn something.  Straight to XSD's I go.
    • A pretty experienced user of XML, having found lots of uses for it in all kinds of scenarios.  I still use XPATH, but pretty much abandoned XSLT because my projects were not steering me in that direction.  My last XSLT coding experince was, wow, 10 years ago!
    • A pretty experienced web developer (classic ASP + .NET since 2002)

    • New to VS2010, having only recently started porting my work out of Framework 2.0 / VS2005 (my employer leap-frogged over VS2008)

    Most of my use of XML has involved dynamically creating XML from code to pass to another process or platform, or across several processes or platforms.  I never had to validate these XML docs because I always knew where they came from (me!), and thus the possibility of having to screen for invalid data was pretty much nil (I'd only have myself to blame).

    My latest project requires some B2B exchange with a consulting team, where data I provide in XML format is going to be consumed by another solution (in this case, a BPM project in webMethods 8.2 middleware).  Their tools work best if you can provide and XSD that describes the data coming in, so they asked me to provide one.  I said sure, let me figure that out.  I knew the rules of cardinality and data formats for this XML doc in my head, so all I needed to do was put these rules into XSD format.

    Well...

    I spun my wheels all day, stumbling across this thread and many others.  I learned that an editor of some sort was available in VS2005, then removed from VS2010.  I thought that's too bad, I am in the midst of migrating to VS2010.  I downloaded some sample files, I read some tutorials, I looked around on MSDN.  I even pondered the possibility of having to ask for $1000 to by XML Spy (a tough argument considering current budget constraints).  And then...

    Shall I say Doh! - or Voila!  I finally happened to click the XML menu in VS 2010, and noticed the Create Schema command.  I had never noticed the XML menu option before, so never thought to check there. It did just what I wanted, which was to infer the XML Schema from the existing XML structure that my code produced.

    Because none of my research came across a simple suggestion to click on Create Schema command, I will offer this as a suggestion for anybody who is doing similar work to mine.  The .xsd file that Visual Studio 2010 spit out for me was great, because it saved me tons of upfront typing and killing myself reading the tutorials.  Then again, the output from the inference engine is not perfect, so it IS worthwhile to learn something about the XSD specification, as I'm doing now. 

    I am going back through the original .xsd file to correct information that the inference engine could not have known, such as which elements are minOccurs="0" as opposed to minOccurs="1".  I'm editing data formats, because the inference engine guesses "xs:string" when really I have a mix of dates (xs:date), bools (xs:boolean), ints (I am not crazy about the default of xs:unisignedShort because it's distracting to read), and currency (xs:decimal is probably most appropriate).

    Things are going rather well, and by the time I am done I think I'll have something pretty good for the consultants to use.  I would like to thank Ben Kubicek for making his simple XML Validator available on The Code Project, because that really helped me too.

    - Eddie

    • Proposed as answer by SarjanWebDev Thursday, September 27, 2012 7:28 AM
    Thursday, September 1, 2011 11:42 PM
  • Sad, I used the editor extensively in 2005, the "explanation" above is nothing more than a lame excuse. 

     

    "We had a poorly programmed module to we gave up fearing we could not do better and ripped out a useful feature"

     

    Fail...

     

    Monday, September 26, 2011 6:59 PM
  • Create Schema command in  XML menu in VS 2010 was discovery, make sure the file that is currently open and has focus is an XML file.

    ManMis

    Thursday, September 27, 2012 7:28 AM