Use CAML Query to Read Data from lists or Libraries

One way to read the data from a list or a library is to iterate through it using the items collection of the list or library. But this is not the most efficient way to do it, specially if only few items are needed from this list. Enter CAML Queries. The following is the example query <where> <eq> <fieldref name="Title"> <value type="Text">title</value> </fieldref> </eq> </where> One thing to note in the CAML Query is that there is start and end tag.