In the XML Schema Explorer, click the element whose name is the name of the file, and then right-click and there you will see "View Code". To do this, you do not need the file to be part of your solution.
You can open the XML Schema Explorer either from the view menu or from the designer.
source
share