Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Viewing XSD as code

Tags:

c#

.net

xsd

When I open XSD files in Visual Studio, some of them open up as diagram representations, while some open up as code.

How do I switch between the diagram view and code view?

like image 904
Raj More Avatar asked Dec 23 '22 01:12

Raj More


2 Answers

In the XML Schema Explorer, click the item whose name is the name of the file and then right click and there you will see "View Code". To do this you don't need the file to be part of your solution.

You can open the XML Schema Explorer either from View Menu or from the designer.

like image 157
Gokce Mutlu Avatar answered Jan 10 '23 22:01

Gokce Mutlu


In order to view the XSD as code in visual studio, you can right click on the document in the solution explorer, choose the Open With... From the menu that pops up, choose Xml Editor (or Xml (Text) editor if it's Visual studio 2010). This should open it in the source view.

like image 45
Joe Avatar answered Jan 10 '23 23:01

Joe