3.1.4.9.3.2 Order By Format

The OrderBy clause MUST be well-formed XML as defined by the XSD in [MS-WSSCAML]. The OrderBy clause specifies the order of the list items in the response by identifying the names of certain fields.

An example of an OrderBy clause is as follows.

 <OrderBy >
     <FieldRef  Name='ID'>
     </FieldRef>
     <FieldRef  Name='Title'
                Ascending='False'>
     </FieldRef>
 </OrderBy>

The OrderBy clause contains a FieldRef element which MUST refer to a valid field name. Valid field names are provided in the Name attribute of the _sProperty element (see section 3.1.4.7.3.3) returned from the GetList operation. The Ascending attribute is optional and indicates ascending order if value is true, descending otherwise. By default, Ascending is true.