How to: Create Code Snippets for XML Files

Visual Studio allows you to create code snippets for XML files. These snippets are created almost identically to snippets for other development languages.

Adding XML Code

These procedures assume that you have followed the procedures explained in the How to: Create a Basic Code Snippet topic.

To add XML code

  1. Locate the Code element of the code snippet.

  2. Set the Language attribute of the Code element to XML. For example:<Code Language="XML"></Code>

  3. Enter the XML code in the same way you would the code for another development language.

See Also

Tasks

How to: Create a Basic Code Snippet

Reference

Creating Code Snippets