Skip to main content

The Fastest way to Export Schema of Sharepoint List

Many of my SharePoint Developer friends are struggling to get the Schema.xml file of a newly created list. The schema.xml file has the list's metadata information, by using the schema.xml, we can create the lis definition and paste this contents of Schema.xml to the Schema.xml file of the newly created List definition, so that you can deploy the list definition on another site.

In order to do this, you guys might be following the procedure bu saving the site template and get the site definition solution. After this, you will open visual studio and import this solution and wait for few minutes. THIS IS A CRAPPY PROCEDURE..Why do you invest your time to get a schema of one or few list  by taking entire site definition?..If that site has lots of lists, then it will take lots of time.


In my Research, i have found a the BEST  and quicker way to get schema.xml file of a particular list which you need Schema.xml. Follow the following procedure :

  1. Go to your site 
  2. click on the list of which you want to take the schema.xml
  3. Click on List setting. In the URL, you will find GUID of the list as like this

   4. Replace %7B with {
       Replace %7D with }
    5. Now the GUID of the list will look like as follows

                           {B852.......700B}
   6.Now enter the following url as follows

     http://ServerName/_vti_bin/owssvr.dll?Cmd=ExportList&List={GUID}

  7. A file name owssvr.xml file will be downloaded. That will be the Schema.xml file of the required list.



    Comments

    Popular posts from this blog

    How to get the SharePoint central admin url programmaticaly via C#?

    I had come across a situation where i had to get the sharepoint central admin's url.. You can follow the following snippet of the code. At the begining add the namespace  using Microsoft.SharePoint.Administration; SPAdministrationWebApplication centralAdminFarmUrl =  Microsoft.SharePoint.Administration.SPAdministrationWebApplication.Local ; String  centralAdminUrl = centralAdminFarmUrl.Sites[0].Url;  This may help someone -Cheers Pradeepa Achar

    Programmatically read the value from web.config file

    Here is a situation where you need to keep a key value pair element in the web.config file and read them during the run time. I suggest, better keep key /value pair under <appSettings> element and read it programmatically . <appSettings>   <add key=" LicenseKey " value=" 987jKouterhsk " /> </appSettings> Assume , you have added a license key as above in the web.config file. You need the license key during run time. You can access the license key class named "ConfigurationManager". write a property  called getLicenseKey and return the corresponding license key. public string GetLicenseKey {    get{   return  ConfigurationManager.AppSettings[" LicenseKey "]; } } Now the property GetLicenseKey will have the value 987jKouterhsk. Use this value as per your requirement. -Cheers Pradeepa Achar