Cool Visual Studio 2005 Feature: Snippets and Document Inference
I love learning new featuresof Visual Studio. Today, I saw an email from Chris Lovett where he showed a feature of snippets that I had no idea existed. Intellisense in an XML document will actually create an XML document inferred from an associated schema.
Start with an XML schema. Here, I created a simple complex type "TN" and created an element "PhoneNumber" using that type.
Create a new XML document. In the Properties pane for the document (hit F4 while in the document editor to pull up the properties), associate the document with the schema that you just created.
Click on the ellipsis button and that will pull up a window that lets you choose from schemas in the project or in the schema cache.
Once you associate the XML document with your schema, go back to the editor for the XML document. As expected, when you type the first angle bracket, you get an Intellisense dropdown according to the schema. That's not the cool part yet...
The cool part is that you can select the node, then hit "TAB TAB" and it will stub out an XML document based on the schema that you just created with the capability of code snippets-like fill-ins for the values.
Comments
Anonymous
April 06, 2007
InfoQ posts about 5 short demos on features you will find in Orcas . Glad to see some buzz being generatedAnonymous
August 16, 2007
XML Editing Tools in Visual StudioAnonymous
August 16, 2007
RIAs mean passing data around and XML is one of the big flavors for doing this. The XML editing toolsAnonymous
August 16, 2007
RIAs mean passing data around and XML is one of the big flavors for doing this. The XML editing toolsAnonymous
August 16, 2007
RIAs mean passing data around and XML is one of the big flavors for doing this. The XML editing toolsAnonymous
August 16, 2007
PingBack from http://msdnrss.thecoderblogs.com/2007/08/16/xml-editing-tools-in-visual-studio/Anonymous
August 16, 2007
PingBack from http://msdnrss.thecoderblogs.com/2007/08/16/xml-editing-tools-in-visual-studio/