Tag Archives: XML

Export SharePoint list data to XML directly from the GUI

The other day I learned of a cool function in SharePoint which can come in handy if you want to export a list to XML. And best of all, no code, script or SharePoint Destroyer… *cough* … Designer needed. What you do is simply to call an OOTB SharePoint service and specify in the query string what it is you want, and in which format:

http://<site url>/_vti_bin/owssvr.dll?Cmd=Display&List=<list guid>&View=<view guid>&Query=*&XMLDATA=TRUE

So what you do is to call the owssvr.dll from the site you want to export from, and in the query string add Cmd=Display. Then you add the List and View you want to export from. If you want all items and fields you simply set Query=*. Mind, you still might have to reference a view, even though it won’t be used when using the query. And in the end, add XMLDATA=TRUE. That’s it! An example of how it might look:


You can get the guid to the list by simply going to the list settings and copy the guid from the url. Its the guid after “…&List=”. That’s it. =) Some documentation about it and other SharePoint services: http://msdn.microsoft.com/en-us/library/dd588689(v=office.11).aspx


CAML Query Example: Including GroupBy

Just to remember how to write these things.

                <FieldRef Name="myFieldName" />
                <Value Type="DateTime">
                  <Today OffsetDays="6"/>
                <FieldRef Name="myFieldName2"/>
                <Value Type="Choice">myFieldValue</Value>
            Collapse ="TRUE"
            GroupLimit ="100">
            <FieldRef Name="myFieldName">
            <FieldRef Name="MBLEventStart">