Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've been troubleshooting my schema.xml file for a list definition and getting more and more frustrated.

So I thought, "Hey, I'll just get it to look right in the UI and then export that and compare it to my current schema.XML file!"

Well, unless I am missing something obvious, this is easier said than done. I've tried installing various tools that Google turned up and none helped.

Can anyone give me a simple answer as to how to export the definition of a list from a SharePoint 2010 site into a schema.xml file?

share|improve this question
    
What to do if we need child items of the lists also in this XML export? –  user12902 Nov 8 '12 at 13:28
add comment

2 Answers 2

up vote 13 down vote accepted

You can retrieve the schema of any list by using the owssvr.dll call from your browser. Following is the syntax:

http://YOUR_SERVER_URL/PATH_TO_SITE_CONTAINING_LIST/_vti_bin/owssvr.dll?Cmd=ExportList&List={YOUR_LIST_GUID}

By replacing the Server and List GUID in above url will return you the XML Schema of the list.

This works on both 2010 and 2007.

Enjoy!

share|improve this answer
    
Ooo - I like that! –  Andy Burns Jun 24 '11 at 14:58
1  
It didn't work for me until I included the path to the actual site where the list lives (it wasn't at the root). I edited your answer. Hope you don't mind. –  JohnFx Jun 24 '11 at 16:15
    
didn't know that either! –  Colin Jun 24 '11 at 17:11
    
Thanks John. Yeah, the path needs to be there in case you're in a subsite (just leave it blank if you're at the root). –  Bil Simser Jun 28 '11 at 18:42
    
Confirmed it works with 2013 as well –  Raymund Oct 30 '13 at 22:27
add comment

Well ... SharePoint Manager 2010 lets you see the Schema for a list - that'd be my first stop.

Alternatively, save the site as a template, download the WSP to disk, and import into Visual Studio.

share|improve this answer
    
Wow! You are right. I hadn't noticed that before. Awesome! –  JohnFx Jun 24 '11 at 13:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.