How to: Examine the Content Model of Nodes Using the Content Model View
Note
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
This topic describes how to explore your nodes using the Content Model View.
To create a new XSD file and display the root element in the Content Model View
Create a new XML Schema file.
Click Use XML Editor to view and edit the underlying XML Schema file on the Start View.
Copy the XML Schema sample code from Sample XML Schema: Purchase Order Schema and paste it to replace the code that was added to the new XSD file by default.
Select the
purchaseOrder
element in the Schema Explorer by right-clicking thepurchaseOrder
element in the XML Editor and selecting Show in XML Explorer.Right-click the
purchaseOrder
in the XML Explorer and select Show in Content Model View.The Content Model View displays the
purchaseOrder
element on its design surface.Expand the
shipTo
,billTo
, anditems
nodes either by double-clicking each node or by clicking the double arrow to the right of each node.The nodes of the
purchaseOrder
element are now expanded and you can see the content model of the element.Click on any node under the
purchaseOrder
element and look at the breadcrumb bar to see where in the schema set the selected node is located.Click the Show Documentation button in the XSD Toolbar to toggle documenation. You can also right-click the design surface to toggle the documentation.
Rick-click the
purchaseOrder
node and select Generate Sample XML to see the XML instance document.