18

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?

1
  • What to do if we need child items of the lists also in this XML export?
    – user12902
    Nov 8, 2012 at 13:28

2 Answers 2

24

You can retrieve the XML 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 in all versions of SharePoint (2007, 2010, 2013, 2016).

Enjoy!

7
  • Ooo - I like that!
    – Andy Burns
    Jun 24, 2011 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, 2011 at 16:15
  • didn't know that either!
    – Colin
    Jun 24, 2011 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, 2011 at 18:42
  • 4
    Confirmed it works with 2013 as well
    – Raymund
    Oct 30, 2013 at 22:27
2

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.

1
  • Wow! You are right. I hadn't noticed that before. Awesome!
    – JohnFx
    Jun 24, 2011 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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