开发者

Viewing XSD as code

开发者 https://www.devze.com 2023-01-08 03:28 出处:网络
开发者_如何学运维When I open XSD files in Visual Studio, some of them open up as diagram representations, while some open up as code.

开发者_如何学运维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?


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.


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.


You can view code by clicking on "XML Schema Explorer"in design mode. Now view "XML Schema Explorer" next to Solution explorer tab -> right click on filename.xsd and select "View code" above properties.


Right Click on the XSD file and choose View Code... or F7 (Shift + F7 for designer)

0

精彩评论

暂无评论...
验证码 换一张
取 消