After doing a lot of custom SharePoint 2007 development since MOSS was released I believe that any custom code should be written as a feature. This make for deployment/activation/deactivation from the SharePoint administrator standpoint a no brainer.
So with everything developed as a feature we are going to get a excellent understanding of the feature.xml and element.xml. Now there is some great documentation on the MSDN site located here but I develop my feature.xml and elements.xml file in Visual Studio 2008 (Actually I use WSPBuilder found here, but it’s all the same) so want to use the built in intellisense. I mean that is a feature that we cant live without anymore right?
Well, below I have outlined how we can get intellisense to work when working with the feature.xml and elements.xml files. All it requires is to at and XSD schema file to each on the xml files.
1) Open up your feature.xml file in Visual Studio and in the properties of the feature.xml file you will need to click the ellipse button next to the Schemas property.
2) Once the Schema window opens you will want to click the “Add” button.
3) The next step here is to navigate to the directory where wss.xsd file is located. This file is located in the “C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATEXML” location on the sharepoint server. If you do not have a local installation of sharepoint you can copy the wss.xsd to your development machine and reference that file in the schema dialog box.
Once you have done this you will have intellisense for the feature and element xm based files, which will make developing the feature and elements xml files much easier. As you can see in the following screenshot intellisense is working based on the XSD.
Hope this helps speeding up your XML development for create features with Visual Studio.