3.1.4.5.3.2 OrderBy 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 (section 3.1.4.3.3.3) returned from the GetList operation. The Ascending attribute is optional and indicates ascending order if value is true, or descending otherwise. By default, Ascending is true.