Collaborative Application Markup Language

For the programming language, see Caml.

CAML (Collaborative Application Markup Language) is an XML based markup language used with Microsoft SharePoint technologies (Windows Sharepoint Services and Office SharePoint Server). Unlike plain XML, CAML contains specific groups of tags to both define and display (render) data.


Developers can use CAML to both construct and display data. Microsoft refers to elements that construct data as "definition" elements and elements that display data as "rendering" elements.

Data definition elements

Data definition elements define lists and sites in the same style as basic XML (but with a limited set of keywords). A simple definition of the fields in a list might look like:

    <Field Type="Counter" Name="ID"/>
    . . . other field definitions. . .

A specific set of tags exists to compare and branch on data within CAML as well:

        <Field Name="CheckedOutUserId" />
     <Expr2 />
     <Then />
       Some more CAML

There are also specialized tags provided for database queries.

Data rendering elements

CAML allows for the generation of HTML based on specific sets of tags. For example, the following example loops through some data and generates an HTML drop down menu of choices:

  <ForEach Select="CHOICES/CHOICE">
       <Property Select="."/>
    <HTML>, </HTML>

Using in SharePoint products

In general, almost all XML files in a SharePoint installation utilize CAML. Specifically CAML is very important in site and list definitions, via the ONET.XML files as well as other corresponding XML files. Here the CAML defines what elements exist on an instance of a site, and the display of these sub-elements, while the ASPX files define how to arrange and display those elements to form the site.

Software developers can use CAML to query against SharePoint lists and views, when programming against the SharePoint API (CAML is supported by SharePoint Web Services and by the SharePoint Object Model).

CAML query syntax can be created graphically from an existing SharePoint list by using the U2U CAML Generator tool and at

External links

This article is issued from Wikipedia - version of the 1/12/2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.