Collaborative Application Markup Language
Encyclopedia
CAML is an XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 based markup language
Markup language
A markup language is a modern system for annotating a text in a way that is syntactically distinguishable from that text. The idea and terminology evolved from the "marking up" of manuscripts, i.e. the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts...

 used with the family of Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 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.

Elements

CAML allows developers to both construct and display data. Microsoft refers to elements used to construct data as "Definition" elements and elements used to display data as "Rendering" elements.

Data Definition Elements

Data definition elements are used to 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 something like this:



. . . other field definitions. . .



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








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:


fld.AddChoice(



,



);


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 is used to define what elements exist on an instance of a site, and the display of these sub-elements, while the ASPX files are used to define how to arrange and display those elements to form the site.

CAML can be used by software developers 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.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK